var my_more = true;
(function() {
    const l = document.createElement("link").relList;
    if (l && l.supports && l.supports("modulepreload"))
        return;
    for (const m of document.querySelectorAll('link[rel="modulepreload"]'))
        v(m);
    new MutationObserver(m=>{
        for (const C of m)
            if (C.type === "childList")
                for (const S of C.addedNodes)
                    S.tagName === "LINK" && S.rel === "modulepreload" && v(S)
    }
    ).observe(document, {
        childList: !0,
        subtree: !0
    });
    function a(m) {
        const C = {};
        return m.integrity && (C.integrity = m.integrity),
        m.referrerPolicy && (C.referrerPolicy = m.referrerPolicy),
        m.crossOrigin === "use-credentials" ? C.credentials = "include" : m.crossOrigin === "anonymous" ? C.credentials = "omit" : C.credentials = "same-origin",
        C
    }
    function v(m) {
        if (m.ep)
            return;
        m.ep = !0;
        const C = a(m);
        fetch(m.href, C)
    }
}
)();
function vn() {}
function _r(n) {
    return n()
}
function Do() {
    return Object.create(null)
}
function Vn(n) {
    n.forEach(_r)
}
function br(n) {
    return typeof n == "function"
}
function ga(n, l) {
    return n != n ? l == l : n !== l || n && typeof n == "object" || typeof n == "function"
}
function va(n) {
    return Object.keys(n).length === 0
}
function Ie(n, l) {
    n.appendChild(l)
}
function fa(n, l, a) {
    n.insertBefore(l, a || null)
}
function wr(n) {
    n.parentNode && n.parentNode.removeChild(n)
}
function Bt(n) {
    return document.createElement(n)
}
function Ln(n) {
    return document.createElementNS("http://www.w3.org/2000/svg", n)
}
function Lt(n) {
    return document.createTextNode(n)
}
function kn() {
    return Lt(" ")
}
function De(n, l, a) {
    a == null ? n.removeAttribute(l) : n.getAttribute(l) !== a && n.setAttribute(l, a)
}
function ya(n) {
    return Array.from(n.childNodes)
}
function di(n, l) {
    l = "" + l,
    n.wholeText !== l && (n.data = l)
}
let fn;
function pn(n) {
    fn = n
}
function ma() {
    if (!fn)
        throw new Error("Function called outside component initialization");
    return fn
}
function Ca(n) {
    ma().$$.on_mount.push(n)
}
const Kt = []
  , Po = [];
let Zt = [];
const Fo = []
  , xa = Promise.resolve();
let mi = !1;
function _a() {
    mi || (mi = !0,
    xa.then(Sr))
}
function Ci(n) {
    Zt.push(n)
}
const pi = new Set;
let Wt = 0;
function Sr() {
    if (Wt !== 0)
        return;
    const n = fn;
    do {
        try {
            for (; Wt < Kt.length; ) {
                const l = Kt[Wt];
                Wt++,
                pn(l),
                ba(l.$$)
            }
        } catch (l) {
            throw Kt.length = 0,
            Wt = 0,
            l
        }
        for (pn(null),
        Kt.length = 0,
        Wt = 0; Po.length; )
            Po.pop()();
        for (let l = 0; l < Zt.length; l += 1) {
            const a = Zt[l];
            pi.has(a) || (pi.add(a),
            a())
        }
        Zt.length = 0
    } while (Kt.length);
    for (; Fo.length; )
        Fo.pop()();
    mi = !1,
    pi.clear(),
    pn(n)
}
function ba(n) {
    if (n.fragment !== null) {
        n.update(),
        Vn(n.before_update);
        const l = n.dirty;
        n.dirty = [-1],
        n.fragment && n.fragment.p(n.ctx, l),
        n.after_update.forEach(Ci)
    }
}
function wa(n) {
    const l = []
      , a = [];
    Zt.forEach(v=>n.indexOf(v) === -1 ? l.push(v) : a.push(v)),
    a.forEach(v=>v()),
    Zt = l
}
const Sa = new Set;
function La(n, l) {
    n && n.i && (Sa.delete(n),
    n.i(l))
}
function ka(n, l, a, v) {
    const {fragment: m, after_update: C} = n.$$;
    m && m.m(l, a),
    v || Ci(()=>{
        const S = n.$$.on_mount.map(_r).filter(br);
        n.$$.on_destroy ? n.$$.on_destroy.push(...S) : Vn(S),
        n.$$.on_mount = []
    }
    ),
    C.forEach(Ci)
}
function Ma(n, l) {
    const a = n.$$;
    a.fragment !== null && (wa(a.after_update),
    Vn(a.on_destroy),
    a.fragment && a.fragment.d(l),
    a.on_destroy = a.fragment = null,
    a.ctx = [])
}
function Aa(n, l) {
    n.$$.dirty[0] === -1 && (Kt.push(n),
    _a(),
    n.$$.dirty.fill(0)),
    n.$$.dirty[l / 31 | 0] |= 1 << l % 31
}
function Ta(n, l, a, v, m, C, S, b=[-1]) {
    const A = fn;
    pn(n);
    const T = n.$$ = {
        fragment: null,
        ctx: [],
        props: C,
        update: vn,
        not_equal: m,
        bound: Do(),
        on_mount: [],
        on_destroy: [],
        on_disconnect: [],
        before_update: [],
        after_update: [],
        context: new Map(l.context || (A ? A.$$.context : [])),
        callbacks: Do(),
        dirty: b,
        skip_bound: !1,
        root: l.target || A.$$.root
    };
    S && S(T.root);
    let I = !1;
    if (T.ctx = a ? a(n, l.props || {}, (B,H,...Z)=>{
        const ce = Z.length ? Z[0] : H;
        return T.ctx && m(T.ctx[B], T.ctx[B] = ce) && (!T.skip_bound && T.bound[B] && T.bound[B](ce),
        I && Aa(n, B)),
        H
    }
    ) : [],
    T.update(),
    I = !0,
    Vn(T.before_update),
    T.fragment = v ? v(T.ctx) : !1,
    l.target) {
        if (l.hydrate) {
            const B = ya(l.target);
            T.fragment && T.fragment.l(B),
            B.forEach(wr)
        } else
            T.fragment && T.fragment.c();
        l.intro && La(n.$$.fragment),
        ka(n, l.target, l.anchor, l.customElement),
        Sr()
    }
    pn(A)
}
class Ea {
    $destroy() {
        Ma(this, 1),
        this.$destroy = vn
    }
    $on(l, a) {
        if (!br(a))
            return vn;
        const v = this.$$.callbacks[l] || (this.$$.callbacks[l] = []);
        return v.push(a),
        ()=>{
            const m = v.indexOf(a);
            m !== -1 && v.splice(m, 1)
        }
    }
    $set(l) {
        this.$$set && !va(l) && (this.$$.skip_bound = !0,
        this.$$set(l),
        this.$$.skip_bound = !1)
    }
}
var Ia = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}
  , oe = {}
  , Da = {
    get exports() {
        return oe
    },
    set exports(n) {
        oe = n
    }
}
  , Pn = {}
  , Pa = {
    get exports() {
        return Pn
    },
    set exports(n) {
        Pn = n
    }
};
/**
 * @license
 * KLineChart v9.2.2
 * Copyright (c) 2019 lihu.
 * Licensed under Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0
 */
(function(n, l) {
    (function(a, v) {
        v(l)
    }
    )(Ia, function(a) {
        function v(r, e) {
            if (b(r) || b(e)) {
                for (var t in e)
                    if (Object.prototype.hasOwnProperty.call(e, t)) {
                        var i = r[t]
                          , o = e[t];
                        b(o) && b(i) && !C(o) && !C(i) ? v(i, o) : T(e[t]) && (r[t] = e[t])
                    }
            }
        }
        function m(r) {
            if (!b(r) || !C(r))
                return r;
            var e;
            for (var t in e = C(r) ? [] : {},
            r)
                if (Object.prototype.hasOwnProperty.call(r, t)) {
                    var i = r[t];
                    e[t] = b(i) ? m(i) : i
                }
            return e
        }
        function C(r) {
            return Object.prototype.toString.call(r) === "[object Array]"
        }
        function S(r) {
            return typeof r == "function"
        }
        function b(r) {
            return typeof r == "object"
        }
        function A(r) {
            return typeof r == "number" && !isNaN(r)
        }
        function T(r) {
            return r != null
        }
        function I(r) {
            return typeof r == "boolean"
        }
        function B(r) {
            return typeof r == "string"
        }
        var H, Z, ce, ge, ve, le, de, pe, re, J, me = /\\(\\)?/g, Le = RegExp(`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`, "g");
        function ue(r, e, t) {
            if (T(r)) {
                var i = [];
                e.replace(Le, function(c) {
                    for (var h = [], d = 1; arguments.length > d; d++)
                        h[d - 1] = arguments[d];
                    var p = c;
                    return T(h[1]) ? p = h[2].replace(me, "$1") : T(h[0]) && (p = h[0].trim()),
                    i.push(p),
                    ""
                });
                for (var o = r, s = 0, u = i.length; T(o) && u > s; )
                    o = o == null ? void 0 : o[i[s++]];
                return T(o) ? o : t ?? "--"
            }
            return t ?? "--"
        }
        function ae(r, e, t) {
            var i = r.format(new Date(e)).split(", ")
              , o = i[0].split("/")
              , s = i[1].split(":")
              , u = {
                YYYY: o[2],
                MM: o[0],
                DD: o[1],
                HH: s[0] === "24" ? "00" : s[0],
                mm: s[1],
                ss: s[2]
            };
            return t.replace(/YYYY|MM|DD|HH|mm|ss/g, function(c) {
                return u[c]
            })
        }
        function G(r, e) {
            var t = +r;
            return A(t) ? t.toFixed(e ?? 2) : "".concat(r)
        }
        function fe(r) {
            var e = +r;
            if (A(e)) {
                if (e > 1e9)
                    return "".concat(+(e / 1e9).toFixed(3), "B");
                if (e > 1e6)
                    return "".concat(+(e / 1e6).toFixed(3), "M");
                if (e > 1e3)
                    return "".concat(+(e / 1e3).toFixed(3), "K")
            }
            return "".concat(r)
        }
        function Ce(r, e) {
            var t = "".concat(r);
            if (e.length === 0)
                return t;
            if (t.includes(".")) {
                var i = t.split(".");
                return "".concat(i[0].replace(/(\d)(?=(\d{3})+$)/g, function(o) {
                    return "".concat(o).concat(e)
                }), ".").concat(i[1])
            }
            return t.replace(/(\d)(?=(\d{3})+$)/g, function(o) {
                return "".concat(o).concat(e)
            })
        }
        a.LineType = void 0,
        (H = a.LineType || (a.LineType = {})).Dashed = "dashed",
        H.Solid = "solid",
        a.PolygonType = void 0,
        (Z = a.PolygonType || (a.PolygonType = {})).Stroke = "stroke",
        Z.Fill = "fill",
        Z.StrokeFill = "stroke_fill",
        a.TooltipShowRule = void 0,
        (ce = a.TooltipShowRule || (a.TooltipShowRule = {})).Always = "always",
        ce.FollowCross = "follow_cross",
        ce.None = "none",
        a.TooltipShowType = void 0,
        (ge = a.TooltipShowType || (a.TooltipShowType = {})).Standard = "standard",
        ge.Rect = "rect",
        a.TooltipIconPosition = void 0,
        (ve = a.TooltipIconPosition || (a.TooltipIconPosition = {})).Left = "left",
        ve.Middle = "middle",
        ve.Right = "right",
        function(r) {
            r.Fixed = "fixed",
            r.Pointer = "pointer"
        }(le || (le = {})),
        a.CandleType = void 0,
        (de = a.CandleType || (a.CandleType = {})).CandleSolid = "candle_solid",
        de.CandleStroke = "candle_stroke",
        de.CandleUpStroke = "candle_up_stroke",
        de.CandleDownStroke = "candle_down_stroke",
        de.Ohlc = "ohlc",
        de.Area = "area",
        a.YAxisPosition = void 0,
        (pe = a.YAxisPosition || (a.YAxisPosition = {})).Left = "left",
        pe.Right = "right",
        a.YAxisType = void 0,
        (re = a.YAxisType || (a.YAxisType = {})).Normal = "normal",
        re.Percentage = "percentage",
        re.Log = "log",
        a.FormatDateType = void 0,
        (J = a.FormatDateType || (a.FormatDateType = {}))[J.Tooltip = 0] = "Tooltip",
        J[J.Crosshair = 1] = "Crosshair",
        J[J.XAxis = 2] = "XAxis";
        var ht = function(r, e) {
            return ht = Object.setPrototypeOf || {
                __proto__: []
            }instanceof Array && function(t, i) {
                t.__proto__ = i
            }
            || function(t, i) {
                for (var o in i)
                    Object.prototype.hasOwnProperty.call(i, o) && (t[o] = i[o])
            }
            ,
            ht(r, e)
        };
        function ee(r, e) {
            if (typeof e != "function" && e !== null)
                throw new TypeError("Class extends value " + e + " is not a constructor or null");
            function t() {
                this.constructor = r
            }
            ht(r, e),
            r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype,
            new t)
        }
        var Ve, X = function() {
            return X = Object.assign || function(r) {
                for (var e, t = 1, i = arguments.length; i > t; t++)
                    for (var o in e = arguments[t])
                        Object.prototype.hasOwnProperty.call(e, o) && (r[o] = e[o]);
                return r
            }
            ,
            X.apply(this, arguments)
        };
        function dt(r, e, t, i) {
            return new (t || (t = Promise))(function(o, s) {
                function u(d) {
                    try {
                        h(i.next(d))
                    } catch (p) {
                        s(p)
                    }
                }
                function c(d) {
                    try {
                        h(i.throw(d))
                    } catch (p) {
                        s(p)
                    }
                }
                function h(d) {
                    var p;
                    d.done ? o(d.value) : (p = d.value,
                    p instanceof t ? p : new t(function(g) {
                        g(p)
                    }
                    )).then(u, c)
                }
                h((i = i.apply(r, e || [])).next())
            }
            )
        }
        function pt(r, e) {
            var t, i, o, s, u = {
                label: 0,
                sent: function() {
                    if (1 & o[0])
                        throw o[1];
                    return o[1]
                },
                trys: [],
                ops: []
            };
            return s = {
                next: c(0),
                throw: c(1),
                return: c(2)
            },
            typeof Symbol == "function" && (s[Symbol.iterator] = function() {
                return this
            }
            ),
            s;
            function c(h) {
                return function(d) {
                    return function(p) {
                        if (t)
                            throw new TypeError("Generator is already executing.");
                        for (; s && (s = 0,
                        p[0] && (u = 0)),
                        u; )
                            try {
                                if (t = 1,
                                i && (o = 2 & p[0] ? i.return : p[0] ? i.throw || ((o = i.return) && o.call(i),
                                0) : i.next) && !(o = o.call(i, p[1])).done)
                                    return o;
                                switch (i = 0,
                                o && (p = [2 & p[0], o.value]),
                                p[0]) {
                                case 0:
                                case 1:
                                    o = p;
                                    break;
                                case 4:
                                    return u.label++,
                                    {
                                        value: p[1],
                                        done: !1
                                    };
                                case 5:
                                    u.label++,
                                    i = p[1],
                                    p = [0];
                                    continue;
                                case 7:
                                    p = u.ops.pop(),
                                    u.trys.pop();
                                    continue;
                                default:
                                    if (o = u.trys,
                                    !((o = o.length > 0 && o[o.length - 1]) || p[0] !== 6 && p[0] !== 2)) {
                                        u = 0;
                                        continue
                                    }
                                    if (p[0] === 3 && (!o || p[1] > o[0] && o[3] > p[1])) {
                                        u.label = p[1];
                                        break
                                    }
                                    if (p[0] === 6 && o[1] > u.label) {
                                        u.label = o[1],
                                        o = p;
                                        break
                                    }
                                    if (o && o[2] > u.label) {
                                        u.label = o[2],
                                        u.ops.push(p);
                                        break
                                    }
                                    o[2] && u.ops.pop(),
                                    u.trys.pop();
                                    continue
                                }
                                p = e.call(r, u)
                            } catch (g) {
                                p = [6, g],
                                i = 0
                            } finally {
                                t = o = 0
                            }
                        if (5 & p[0])
                            throw p[1];
                        return {
                            value: p[0] ? p[1] : void 0,
                            done: !0
                        }
                    }([h, d])
                }
            }
        }
        function tt(r) {
            var e = typeof Symbol == "function" && Symbol.iterator
              , t = e && r[e]
              , i = 0;
            if (t)
                return t.call(r);
            if (r && typeof r.length == "number")
                return {
                    next: function() {
                        return r && i >= r.length && (r = void 0),
                        {
                            value: r && r[i++],
                            done: !r
                        }
                    }
                };
            throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
        }
        function q(r, e) {
            var t = typeof Symbol == "function" && r[Symbol.iterator];
            if (!t)
                return r;
            var i, o, s = t.call(r), u = [];
            try {
                for (; (e === void 0 || e-- > 0) && !(i = s.next()).done; )
                    u.push(i.value)
            } catch (c) {
                o = {
                    error: c
                }
            } finally {
                try {
                    i && !i.done && (t = s.return) && t.call(s)
                } finally {
                    if (o)
                        throw o.error
                }
            }
            return u
        }
        function Te(r, e, t) {
            if (t || arguments.length === 2)
                for (var i, o = 0, s = e.length; s > o; o++)
                    !i && o in e || (i || (i = Array.prototype.slice.call(e, 0, o)),
                    i[o] = e[o]);
            return r.concat(i || Array.prototype.slice.call(e))
        }
        a.ActionType = void 0,
        (Ve = a.ActionType || (a.ActionType = {})).OnZoom = "onZoom",
        Ve.OnScroll = "onScroll",
        Ve.OnVisibleRangeChange = "onVisibleRangeChange",
        Ve.OnTooltipIconClick = "onTooltipIconClick",
        Ve.OnCrosshairChange = "onCrosshairChange",
        Ve.OnCandleBarClick = "onCandleBarClick",
        Ve.OnPaneDrag = "onPaneDrag";
        var ze, nt = function() {
            function r() {
                this._callbacks = []
            }
            return r.prototype.subscribe = function(e) {
                var t;
                0 > ((t = this._callbacks.indexOf(e)) !== null && t !== void 0 ? t : -1) && this._callbacks.push(e)
            }
            ,
            r.prototype.unsubscribe = function(e) {
                var t;
                if (e !== void 0) {
                    var i = (t = this._callbacks.indexOf(e)) !== null && t !== void 0 ? t : -1;
                    i > -1 && this._callbacks.splice(i, 1)
                } else
                    this._callbacks = []
            }
            ,
            r.prototype.execute = function(e) {
                this._callbacks.forEach(function(t) {
                    t(e)
                })
            }
            ,
            r.prototype.isEmpty = function() {
                return this._callbacks.length === 0
            }
            ,
            r
        }(), At = new (function() {
            function r() {
                this._baseId = 1
            }
            return r.prototype.next = function(e) {
                var t = new Date().getTime();
                return t === this._prevIdTimestamp ? ++this._baseId : this._baseId = 1,
                this._prevIdTimestamp = t,
                "".concat(e ?? "").concat(t, "_").concat(this._baseId)
            }
            ,
            r
        }());
        function V(r) {
            return At.next(r)
        }
        function R(r, e) {
            var t, i = document.createElement(r), o = e ?? {};
            for (var s in o)
                i.style[s] = (t = o[s]) !== null && t !== void 0 ? t : "";
            return i
        }
        function j(r) {
            var e, t, i;
            return (i = (t = (e = r.ownerDocument) === null || e === void 0 ? void 0 : e.defaultView) === null || t === void 0 ? void 0 : t.devicePixelRatio) !== null && i !== void 0 ? i : 2
        }
        function Q(r, e, t) {
            return "".concat(e ?? "normal", " ").concat(r ?? 12, "px ").concat(t ?? "Helvetica Neue")
        }
        function xe(r, e, t, i) {
            if (ze === void 0) {
                var o = document.createElement("canvas")
                  , s = j(o);
                (ze = o.getContext("2d")).scale(s, s)
            }
            return ze.font = Q(e, t, i),
            Math.round(ze.measureText(r).width)
        }
        function Be(r, e, t) {
            var i = 0
              , o = 0;
            for (o = r.length - 1; i !== o; ) {
                var s = Math.floor((o + i) / 2)
                  , u = o - i
                  , c = r[s][e];
                if (t === r[i][e])
                    return i;
                if (t === r[o][e])
                    return o;
                if (t === c)
                    return s;
                if (t > c ? i = s : o = s,
                2 >= u)
                    break
            }
            return i
        }
        function it(r, e) {
            return e == null && (e = 10),
            +(+r).toFixed(e = Math.min(Math.max(0, e), 20))
        }
        function Ct(r, e, t) {
            var i = [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER];
            return r.forEach(function(o) {
                var s, u;
                i[0] = Math.max((s = o[e]) !== null && s !== void 0 ? s : o, i[0]),
                i[1] = Math.min((u = o[t]) !== null && u !== void 0 ? u : o, i[1])
            }),
            i
        }
        function xt(r) {
            return Math.log(r) / Math.log(10)
        }
        function Tt(r) {
            return Math.pow(10, r)
        }
        var Gn, c1 = 1, u1 = 50, h1 = function() {
            function r(e) {
                this._dateTimeFormat = this._buildDateTimeFormat(),
                this._zoomEnabled = !0,
                this._scrollEnabled = !0,
                this._loading = !0,
                this._loadMoreCallback = null,
                this._more = !0,
                this._totalBarSpace = 0,
                this._barSpace = 6,
                this._offsetRightDistance = 50,
                this._startScrollOffsetRightBarCount = 0,
                this._minVisibleBarCount = {
                    left: 2,
                    right: 2
                },
                this._visibleRange = {
                    from: 0,
                    to: 0,
                    realFrom: 0,
                    realTo: 0
                },
                this._chartStore = e,
                this._gapBarSpace = this._calcGapBarSpace(),
                this._offsetRightBarCount = this._offsetRightDistance / this._barSpace
            }
            return r.prototype._calcGapBarSpace = function() {
                return Math.max(1, Math.min(Math.floor(.82 * this._barSpace), Math.floor(this._barSpace) - 1))
            }
            ,
            r.prototype.adjustVisibleRange = function() {
                var e, t = this._chartStore.getDataList(), i = t.length, o = this._totalBarSpace / this._barSpace, s = o - Math.min(this._minVisibleBarCount.left, i);
                this._offsetRightBarCount > s && (this._offsetRightBarCount = s);
                var u = -i + Math.min(this._minVisibleBarCount.right, i);
                u > this._offsetRightBarCount && (this._offsetRightBarCount = u);
                var c = Math.round(this._offsetRightBarCount + i + .5);
                c > i && (c = i);
                var h = Math.round(c - o) - 1;
                if (0 > h && (h = 0),
                this._visibleRange = {
                    from: h,
                    to: c,
                    realFrom: this._offsetRightBarCount > 0 ? Math.round(i + this._offsetRightBarCount - o) - 1 : h,
                    realTo: c
                },
                this._chartStore.getActionStore().execute(a.ActionType.OnVisibleRangeChange, this._visibleRange),
                this._chartStore.adjustVisibleDataList(),
                h === 0 && this._more && !this._loading && this._loadMoreCallback !== null) {
                    this._loading = !0;
                    var d = t[0];
                    this._loadMoreCallback((e = d == null ? void 0 : d.timestamp) !== null && e !== void 0 ? e : null)
                }
            }
            ,
            r.prototype.setMore = function(e) {
                return this._more = e,
                this
            }
            ,
            r.prototype.setLoading = function(e) {
                return this._loading = e,
                this
            }
            ,
            r.prototype.getDateTimeFormat = function() {
                return this._dateTimeFormat
            }
            ,
            r.prototype._buildDateTimeFormat = function(e) {
                var t = {
                    hour12: !1,
                    year: "numeric",
                    month: "2-digit",
                    day: "2-digit",
                    hour: "2-digit",
                    minute: "2-digit",
                    second: "2-digit"
                };
                e !== void 0 && (t.timeZone = e);
                var i = null;
                try {
                    i = new Intl.DateTimeFormat("en",t)
                } catch {}
                return i
            }
            ,
            r.prototype.setTimezone = function(e) {
                var t = this._buildDateTimeFormat(e);
                t !== null && (this._dateTimeFormat = t)
            }
            ,
            r.prototype.getTimezone = function() {
                return this._dateTimeFormat.resolvedOptions().timeZone
            }
            ,
            r.prototype.getBarSpace = function() {
                return {
                    bar: this._barSpace,
                    halfBar: this._barSpace / 2,
                    gapBar: this._gapBarSpace,
                    halfGapBar: this._gapBarSpace / 2
                }
            }
            ,
            r.prototype.setBarSpace = function(e, t) {
                c1 > e || e > u1 || this._barSpace === e || (this._barSpace = e,
                this._gapBarSpace = this._calcGapBarSpace(),
                t == null || t(),
                this.adjustVisibleRange(),
                this._chartStore.getCrosshairStore().recalculate(!0),
                this._chartStore.getChart().adjustPaneViewport(!1, !0, !0, !0))
            }
            ,
            r.prototype.setTotalBarSpace = function(e) {
                return this._totalBarSpace !== e && (this._totalBarSpace = e,
                this.adjustVisibleRange(),
                this._chartStore.getCrosshairStore().recalculate(!0)),
                this
            }
            ,
            r.prototype.setOffsetRightDistance = function(e, t) {
                return this._offsetRightDistance = e,
                this._offsetRightBarCount = e / this._barSpace,
                t != null && t && (this.adjustVisibleRange(),
                this._chartStore.getCrosshairStore().recalculate(!0),
                this._chartStore.getChart().adjustPaneViewport(!1, !0, !0, !0)),
                this
            }
            ,
            r.prototype.resetOffsetRightDistance = function() {
                this.setOffsetRightDistance(this._offsetRightDistance)
            }
            ,
            r.prototype.getInitialOffsetRightDistance = function() {
                return this._offsetRightDistance
            }
            ,
            r.prototype.getOffsetRightDistance = function() {
                return Math.max(0, this._offsetRightBarCount * this._barSpace)
            }
            ,
            r.prototype.getOffsetRightBarCount = function() {
                return this._offsetRightBarCount
            }
            ,
            r.prototype.setOffsetRightBarCount = function(e) {
                return this._offsetRightBarCount = e,
                this
            }
            ,
            r.prototype.setLeftMinVisibleBarCount = function(e) {
                return this._minVisibleBarCount.left = e,
                this
            }
            ,
            r.prototype.setRightMinVisibleBarCount = function(e) {
                return this._minVisibleBarCount.right = e,
                this
            }
            ,
            r.prototype.getVisibleRange = function() {
                return this._visibleRange
            }
            ,
            r.prototype.startScroll = function() {
                this._startScrollOffsetRightBarCount = this._offsetRightBarCount
            }
            ,
            r.prototype.scroll = function(e) {
                if (this._scrollEnabled) {
                    var t = e / this._barSpace;
                    this._chartStore.getActionStore().execute(a.ActionType.OnScroll),
                    this._offsetRightBarCount = this._startScrollOffsetRightBarCount - t,
                    this.adjustVisibleRange(),
                    this._chartStore.getCrosshairStore().recalculate(!0),
                    this._chartStore.getChart().adjustPaneViewport(!1, !0, !0, !0)
                }
            }
            ,
            r.prototype.getDataByDataIndex = function(e) {
                var t;
                return (t = this._chartStore.getDataList()[e]) !== null && t !== void 0 ? t : null
            }
            ,
            r.prototype.coordinateToFloatIndex = function(e) {
                var t = this._chartStore.getDataList().length;
                return Math.round(1e6 * (t + this._offsetRightBarCount - (this._totalBarSpace - e) / this._barSpace)) / 1e6
            }
            ,
            r.prototype.dataIndexToTimestamp = function(e) {
                var t, i = this.getDataByDataIndex(e);
                return (t = i == null ? void 0 : i.timestamp) !== null && t !== void 0 ? t : null
            }
            ,
            r.prototype.timestampToDataIndex = function(e) {
                var t = this._chartStore.getDataList();
                return t.length === 0 ? 0 : Be(t, "timestamp", e)
            }
            ,
            r.prototype.dataIndexToCoordinate = function(e) {
                var t = this._chartStore.getDataList().length;
                return this._totalBarSpace - (t + this._offsetRightBarCount - e - .5) * this._barSpace
            }
            ,
            r.prototype.coordinateToDataIndex = function(e) {
                return Math.ceil(this.coordinateToFloatIndex(e)) - 1
            }
            ,
            r.prototype.zoom = function(e, t) {
                var i, o = this;
                if (this._zoomEnabled) {
                    if ((t == null ? void 0 : t.x) === void 0) {
                        var s = this._chartStore.getCrosshairStore().get();
                        t = {
                            x: (i = s == null ? void 0 : s.x) !== null && i !== void 0 ? i : this._totalBarSpace / 2
                        }
                    }
                    this._chartStore.getActionStore().execute(a.ActionType.OnZoom);
                    var u = this.coordinateToFloatIndex(t.x);
                    this.setBarSpace(this._barSpace + e * (this._barSpace / 10), function() {
                        o._offsetRightBarCount += u - o.coordinateToFloatIndex(t == null ? void 0 : t.x)
                    })
                }
            }
            ,
            r.prototype.setZoomEnabled = function(e) {
                return this._zoomEnabled = e,
                this
            }
            ,
            r.prototype.getZoomEnabled = function() {
                return this._zoomEnabled
            }
            ,
            r.prototype.setScrollEnabled = function(e) {
                return this._scrollEnabled = e,
                this
            }
            ,
            r.prototype.getScrollEnabled = function() {
                return this._scrollEnabled
            }
            ,
            r.prototype.setLoadMoreCallback = function(e) {
                return this._loadMoreCallback = e,
                this
            }
            ,
            r.prototype.clear = function() {
                this._more = !0,
                this._loading = !0,
                this._visibleRange = {
                    from: 0,
                    to: 0,
                    realFrom: 0,
                    realTo: 0
                }
            }
            ,
            r
        }();
        function $n(r, e, t, i, o) {
            var s, u, c, h = e.result, d = e.figures, p = e.styles, g = ue(p, "circles", i.circles), y = g.length, f = ue(p, "bars", i.bars), x = f.length, _ = ue(p, "lines", i.lines), w = _.length, L = 0, M = 0, k = 0, E = 0;
            d.forEach(function(D) {
                var F, N, O, z;
                switch (D.type) {
                case "circle":
                    u = (s = g[L % y]).style,
                    c = s.noChangeColor,
                    E = L,
                    L++;
                    break;
                case "bar":
                    u = (s = f[M % x]).style,
                    c = s.noChangeColor,
                    E = M,
                    M++;
                    break;
                case "line":
                    u = (s = _[k % w]).style,
                    c = s.color,
                    E = k,
                    k++
                }
                if (T(s)) {
                    var U = (N = (F = D.styles) === null || F === void 0 ? void 0 : F.call(D, {
                        prev: {
                            kLineData: r[t - 1],
                            indicatorData: h[t - 1]
                        },
                        current: {
                            kLineData: r[t],
                            indicatorData: h[t]
                        },
                        next: {
                            kLineData: r[t + 1],
                            indicatorData: h[t + 1]
                        }
                    }, e, i)) !== null && N !== void 0 ? N : {
                        style: u,
                        color: c
                    };
                    o(D, {
                        style: (O = U.style) !== null && O !== void 0 ? O : u,
                        color: (z = U.color) !== null && z !== void 0 ? z : c
                    }, s, E)
                }
            })
        }
        a.IndicatorSeries = void 0,
        (Gn = a.IndicatorSeries || (a.IndicatorSeries = {})).Normal = "normal",
        Gn.Price = "price",
        Gn.Volume = "volume";
        var Wi = function() {
            function r(e) {
                this.result = [],
                this._precisionFlag = !1;
                var t = e.name
                  , i = e.shortName
                  , o = e.series
                  , s = e.calcParams
                  , u = e.figures
                  , c = e.precision
                  , h = e.shouldOhlc
                  , d = e.shouldFormatBigNumber
                  , p = e.visible
                  , g = e.minValue
                  , y = e.maxValue
                  , f = e.styles
                  , x = e.extendData
                  , _ = e.regenerateFigures
                  , w = e.createTooltipDataSource
                  , L = e.draw;
                this.name = t,
                this.shortName = i ?? t,
                this.series = o ?? a.IndicatorSeries.Normal,
                this.precision = c ?? 4,
                this.calcParams = s ?? [],
                this.figures = u ?? [],
                this.shouldOhlc = h != null && h,
                this.shouldFormatBigNumber = d != null && d,
                this.visible = p == null || p,
                this.minValue = g ?? null,
                this.maxValue = y ?? null,
                this.styles = f ?? null,
                this.extendData = x,
                this.regenerateFigures = _ ?? null,
                this.createTooltipDataSource = w ?? null,
                this.draw = L ?? null
            }
            return r.prototype.setShortName = function(e) {
                return this.shortName !== e && (this.shortName = e,
                !0)
            }
            ,
            r.prototype.setSeries = function(e) {
                return this.series !== e && (this.series = e,
                !0)
            }
            ,
            r.prototype.setPrecision = function(e, t) {
                var i = t != null && t
                  , o = Math.floor(e);
                return !(o === this.precision || 0 > e || i && (!i || this._precisionFlag)) && (this.precision = o,
                i || (this._precisionFlag = !0),
                !0)
            }
            ,
            r.prototype.setCalcParams = function(e) {
                var t, i;
                return this.calcParams = e,
                this.figures = (i = (t = this.regenerateFigures) === null || t === void 0 ? void 0 : t.call(this, e)) !== null && i !== void 0 ? i : this.figures,
                !0
            }
            ,
            r.prototype.setShouldOhlc = function(e) {
                return this.shouldOhlc !== e && (this.shouldOhlc = e,
                !0)
            }
            ,
            r.prototype.setShouldFormatBigNumber = function(e) {
                return this.shouldFormatBigNumber !== e && (this.shouldFormatBigNumber = e,
                !0)
            }
            ,
            r.prototype.setVisible = function(e) {
                return this.visible !== e && (this.visible = e,
                !0)
            }
            ,
            r.prototype.setStyles = function(e) {
                return this.styles !== e && (this.styles = e,
                !0)
            }
            ,
            r.prototype.setExtendData = function(e) {
                return this.extendData !== e && (this.extendData = e,
                !0)
            }
            ,
            r.prototype.setFigures = function(e) {
                return this.figures !== e && (this.figures = e,
                !0)
            }
            ,
            r.prototype.setMinValue = function(e) {
                return this.minValue !== e && (this.minValue = e,
                !0)
            }
            ,
            r.prototype.setMaxValue = function(e) {
                return this.maxValue !== e && (this.maxValue = e,
                !0)
            }
            ,
            r.prototype.setRegenerateFigures = function(e) {
                return this.regenerateFigures !== e && (this.regenerateFigures = e,
                !0)
            }
            ,
            r.prototype.setCreateTooltipDataSource = function(e) {
                return this.createTooltipDataSource !== e && (this.createTooltipDataSource = e,
                !0)
            }
            ,
            r.prototype.setDraw = function(e) {
                return this.draw !== e && (this.draw = e,
                !0)
            }
            ,
            r.prototype.calcIndicator = function(e) {
                return dt(this, void 0, void 0, function() {
                    var t;
                    return pt(this, function(i) {
                        switch (i.label) {
                        case 0:
                            return i.trys.push([0, 2, , 3]),
                            [4, this.calc(e, this)];
                        case 1:
                            return t = i.sent(),
                            this.result = t,
                            [2, !0];
                        case 2:
                            return i.sent(),
                            [2, !1];
                        case 3:
                            return [2]
                        }
                    })
                })
            }
            ,
            r.extend = function(e) {
                return function(t) {
                    function i() {
                        return t.call(this, e) || this
                    }
                    return ee(i, t),
                    i.prototype.calc = function(o, s) {
                        return e.calc(o, s)
                    }
                    ,
                    i
                }(r)
            }
            ,
            r
        }()
          , d1 = {
            name: "AVP",
            shortName: "AVP",
            series: a.IndicatorSeries.Price,
            precision: 2,
            figures: [{
                key: "avp",
                title: "AVP: ",
                type: "line"
            }],
            calc: function(r) {
                var e = 0
                  , t = 0;
                return r.map(function(i) {
                    var o, s, u = {}, c = (o = i == null ? void 0 : i.turnover) !== null && o !== void 0 ? o : 0, h = (s = i == null ? void 0 : i.volume) !== null && s !== void 0 ? s : 0;
                    return e += c,
                    (t += h) !== 0 && (u.avp = e / t),
                    u
                })
            }
        }
          , p1 = {
            name: "EMA",
            shortName: "EMA",
            series: a.IndicatorSeries.Price,
            calcParams: [6, 12, 20],
            precision: 2,
            shouldOhlc: !0,
            figures: [{
                key: "ema1",
                title: "EMA6: ",
                type: "line"
            }, {
                key: "ema2",
                title: "EMA12: ",
                type: "line"
            }, {
                key: "ema3",
                title: "EMA20: ",
                type: "line"
            }],
            regenerateFigures: function(r) {
                return r.map(function(e, t) {
                    return {
                        key: "ema".concat(t + 1),
                        title: "EMA".concat(e, ": "),
                        type: "line"
                    }
                })
            },
            calc: function(r, e) {
                var t = e.calcParams
                  , i = e.figures
                  , o = 0
                  , s = [];
                return r.map(function(u, c) {
                    var h = {}
                      , d = u.close;
                    return o += d,
                    t.forEach(function(p, g) {
                        p - 1 > c || (s[g] = c > p - 1 ? (2 * d + (p - 1) * s[g]) / (p + 1) : o / p,
                        h[i[g].key] = s[g])
                    }),
                    h
                })
            }
        }
          , g1 = {
            name: "MA",
            shortName: "MA",
            series: a.IndicatorSeries.Price,
            calcParams: [5, 10, 30, 60],
            precision: 2,
            shouldOhlc: !0,
            figures: [{
                key: "ma5",
                title: "MA5: ",
                type: "line"
            }, {
                key: "ma10",
                title: "MA10: ",
                type: "line"
            }, {
                key: "ma30",
                title: "MA30: ",
                type: "line"
            }, {
                key: "ma60",
                title: "MA60: ",
                type: "line"
            }],
            regenerateFigures: function(r) {
                return r.map(function(e, t) {
                    return {
                        key: "ma".concat(t + 1),
                        title: "MA".concat(e, ": "),
                        type: "line"
                    }
                })
            },
            calc: function(r, e) {
                var t = e.calcParams
                  , i = e.figures
                  , o = [];
                return r.map(function(s, u) {
                    var c = {}
                      , h = s.close;
                    return t.forEach(function(d, p) {
                        var g;
                        o[p] = ((g = o[p]) !== null && g !== void 0 ? g : 0) + h,
                        d - 1 > u || (c[i[p].key] = o[p] / d,
                        o[p] -= r[u - (d - 1)].close)
                    }),
                    c
                })
            }
        }
          , v1 = {
            name: "RSI",
            shortName: "RSI",
            calcParams: [6, 12, 24],
            figures: [{
                key: "rsi1",
                title: "RSI1: ",
                type: "line"
            }, {
                key: "rsi2",
                title: "RSI2: ",
                type: "line"
            }, {
                key: "rsi3",
                title: "RSI3: ",
                type: "line"
            }],
            regenerateFigures: function(r) {
                return r.map(function(e, t) {
                    var i = t + 1;
                    return {
                        key: "rsi".concat(i),
                        title: "RSI".concat(i, ": "),
                        type: "line"
                    }
                })
            },
            calc: function(r, e) {
                var t = e.calcParams
                  , i = e.figures
                  , o = []
                  , s = [];
                return r.map(function(u, c) {
                    var h, d = {}, p = ((h = r[c - 1]) !== null && h !== void 0 ? h : u).close, g = u.close - p;
                    return t.forEach(function(y, f) {
                        var x, _, w;
                        if (g > 0 ? o[f] = ((x = o[f]) !== null && x !== void 0 ? x : 0) + g : s[f] = ((_ = s[f]) !== null && _ !== void 0 ? _ : 0) + Math.abs(g),
                        c >= y - 1) {
                            d[i[f].key] = s[f] !== 0 ? 100 - 100 / (1 + o[f] / s[f]) : 0;
                            var L = r[c - (y - 1)]
                              , M = (w = r[c - y]) !== null && w !== void 0 ? w : L
                              , k = L.close - M.close;
                            k > 0 ? o[f] -= k : s[f] -= Math.abs(k)
                        }
                    }),
                    d
                })
            }
        }
          , f1 = {
            name: "VOL",
            shortName: "VOL",
            series: a.IndicatorSeries.Volume,
            calcParams: [5, 10, 20],
            shouldFormatBigNumber: !0,
            precision: 0,
            minValue: 0,
            figures: [{
                key: "ma1",
                title: "MA5: ",
                type: "line"
            }, {
                key: "ma2",
                title: "MA10: ",
                type: "line"
            }, {
                key: "ma3",
                title: "MA20: ",
                type: "line"
            }, {
                key: "volume",
                title: "VOLUME: ",
                type: "bar",
                baseValue: 0,
                styles: function(r, e, t) {
                    var i = r.current.kLineData;
                    return {
                        color: i.close > i.open ? ue(e.styles, "bars[0].upColor", t.bars[0].upColor) : i.open > i.close ? ue(e.styles, "bars[0].downColor", t.bars[0].downColor) : ue(e.styles, "bars[0].noChangeColor", t.bars[0].noChangeColor)
                    }
                }
            }],
            regenerateFigures: function(r) {
                var e = r.map(function(t, i) {
                    return {
                        key: "ma".concat(i + 1),
                        title: "MA".concat(t, ": "),
                        type: "line"
                    }
                });
                return e.push({
                    key: "volume",
                    title: "VOLUME: ",
                    type: "bar",
                    baseValue: 0,
                    styles: function(t, i, o) {
                        var s = t.current.kLineData;
                        return {
                            color: s.close > s.open ? ue(i.styles, "bars[0].upColor", o.bars[0].upColor) : s.open > s.close ? ue(i.styles, "bars[0].downColor", o.bars[0].downColor) : ue(i.styles, "bars[0].noChangeColor", o.bars[0].noChangeColor)
                        }
                    }
                }),
                e
            },
            calc: function(r, e) {
                var t = e.calcParams
                  , i = e.figures
                  , o = [];
                return r.map(function(s, u) {
                    var c, h = (c = s.volume) !== null && c !== void 0 ? c : 0, d = {
                        volume: h
                    };
                    return t.forEach(function(p, g) {
                        var y, f;
                        o[g] = ((y = o[g]) !== null && y !== void 0 ? y : 0) + h,
                        p - 1 > u || (d[i[g].key] = o[g] / p,
                        o[g] -= (f = r[u - (p - 1)].volume) !== null && f !== void 0 ? f : 0)
                    }),
                    d
                })
            }
        }
          , y1 = {
            name: "WR",
            shortName: "WR",
            calcParams: [6, 10, 14],
            figures: [{
                key: "wr1",
                title: "WR1: ",
                type: "line"
            }, {
                key: "wr2",
                title: "WR2: ",
                type: "line"
            }, {
                key: "wr3",
                title: "WR3: ",
                type: "line"
            }],
            regenerateFigures: function(r) {
                return r.map(function(e, t) {
                    return {
                        key: "wr".concat(t + 1),
                        title: "WR".concat(t + 1, ": "),
                        type: "line"
                    }
                })
            },
            calc: function(r, e) {
                var t = e.calcParams
                  , i = e.figures;
                return r.map(function(o, s) {
                    var u = {}
                      , c = o.close;
                    return t.forEach(function(h, d) {
                        var p = h - 1;
                        if (s >= p) {
                            var g = Ct(r.slice(s - p, s + 1), "high", "low")
                              , y = g[0]
                              , f = y - g[1];
                            u[i[d].key] = f === 0 ? 0 : (c - y) / f * 100
                        }
                    }),
                    u
                })
            }
        }
          , Cn = {}
          , m1 = [d1, {
            name: "AO",
            shortName: "AO",
            calcParams: [5, 34],
            figures: [{
                key: "ao",
                title: "AO: ",
                type: "bar",
                baseValue: 0,
                styles: function(r, e, t) {
                    var i, o, s, u, c = (o = (i = r.prev.indicatorData) === null || i === void 0 ? void 0 : i.ao) !== null && o !== void 0 ? o : Number.MIN_SAFE_INTEGER, h = (u = (s = r.current.indicatorData) === null || s === void 0 ? void 0 : s.ao) !== null && u !== void 0 ? u : Number.MIN_SAFE_INTEGER;
                    return {
                        color: h > c ? ue(e.styles, "bars[0].upColor", t.bars[0].upColor) : ue(e.styles, "bars[0].downColor", t.bars[0].downColor),
                        style: h > c ? "stroke" : "fill"
                    }
                }
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = Math.max(t[0], t[1])
                  , o = 0
                  , s = 0
                  , u = 0
                  , c = 0;
                return r.map(function(h, d) {
                    var p, g = {}, y = (h.low + h.high) / 2;
                    return o += y,
                    s += y,
                    d < t[0] - 1 || (u = o / t[0],
                    o -= ((p = r[d - (t[0] - 1)]).low + p.high) / 2),
                    d < t[1] - 1 || (c = s / t[1],
                    s -= ((p = r[d - (t[1] - 1)]).low + p.high) / 2),
                    i - 1 > d || (g.ao = u - c),
                    g
                })
            }
        }, {
            name: "BIAS",
            shortName: "BIAS",
            calcParams: [6, 12, 24],
            figures: [{
                key: "bias1",
                title: "BIAS6: ",
                type: "line"
            }, {
                key: "bias2",
                title: "BIAS12: ",
                type: "line"
            }, {
                key: "bias3",
                title: "BIAS24: ",
                type: "line"
            }],
            regenerateFigures: function(r) {
                return r.map(function(e, t) {
                    return {
                        key: "bias".concat(t + 1),
                        title: "BIAS".concat(e, ": "),
                        type: "line"
                    }
                })
            },
            calc: function(r, e) {
                var t = e.calcParams
                  , i = e.figures
                  , o = [];
                return r.map(function(s, u) {
                    var c = {}
                      , h = s.close;
                    return t.forEach(function(d, p) {
                        var g;
                        if (o[p] = ((g = o[p]) !== null && g !== void 0 ? g : 0) + h,
                        u >= d - 1) {
                            var y = o[p] / t[p];
                            c[i[p].key] = (h - y) / y * 100,
                            o[p] -= r[u - (d - 1)].close
                        }
                    }),
                    c
                })
            }
        }, {
            name: "BOLL",
            shortName: "BOLL",
            series: a.IndicatorSeries.Price,
            calcParams: [20, 2],
            precision: 2,
            shouldOhlc: !0,
            figures: [{
                key: "up",
                title: "UP: ",
                type: "line"
            }, {
                key: "mid",
                title: "MID: ",
                type: "line"
            }, {
                key: "dn",
                title: "DN: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = t[0] - 1
                  , o = 0;
                return r.map(function(s, u) {
                    var c = {};
                    if (o += s.close,
                    u >= i) {
                        c.mid = o / t[0];
                        var h = function(d, p) {
                            var g = d.length
                              , y = 0;
                            return d.forEach(function(f) {
                                var x = f.close - p;
                                y += x * x
                            }),
                            Math.sqrt((y = Math.abs(y)) / g)
                        }(r.slice(u - i, u + 1), c.mid);
                        c.up = c.mid + t[1] * h,
                        c.dn = c.mid - t[1] * h,
                        o -= r[u - i].close
                    }
                    return c
                })
            }
        }, {
            name: "BRAR",
            shortName: "BRAR",
            calcParams: [26],
            figures: [{
                key: "br",
                title: "BR: ",
                type: "line"
            }, {
                key: "ar",
                title: "AR: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = 0
                  , o = 0
                  , s = 0
                  , u = 0;
                return r.map(function(c, h) {
                    var d, p, g = {}, y = c.high, f = c.low, x = c.open, _ = ((d = r[h - 1]) !== null && d !== void 0 ? d : c).close;
                    if (s += y - x,
                    u += x - f,
                    i += y - _,
                    o += _ - f,
                    h >= t[0] - 1) {
                        g.ar = u !== 0 ? s / u * 100 : 0,
                        g.br = o !== 0 ? i / o * 100 : 0;
                        var w = r[h - (t[0] - 1)]
                          , L = w.high
                          , M = w.low
                          , k = w.open
                          , E = ((p = r[h - t[0]]) !== null && p !== void 0 ? p : r[h - (t[0] - 1)]).close;
                        i -= L - E,
                        o -= E - M,
                        s -= L - k,
                        u -= k - M
                    }
                    return g
                })
            }
        }, {
            name: "BBI",
            shortName: "BBI",
            series: a.IndicatorSeries.Price,
            precision: 2,
            calcParams: [3, 6, 12, 24],
            shouldOhlc: !0,
            figures: [{
                key: "bbi",
                title: "BBI: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = Math.max.apply(Math, Te([], q(t), !1))
                  , o = []
                  , s = [];
                return r.map(function(u, c) {
                    var h = {}
                      , d = u.close;
                    if (t.forEach(function(g, y) {
                        var f;
                        o[y] = ((f = o[y]) !== null && f !== void 0 ? f : 0) + d,
                        g - 1 > c || (s[y] = o[y] / g,
                        o[y] -= r[c - (g - 1)].close)
                    }),
                    c >= i - 1) {
                        var p = 0;
                        s.forEach(function(g) {
                            p += g
                        }),
                        h.bbi = p / 4
                    }
                    return h
                })
            }
        }, {
            name: "CCI",
            shortName: "CCI",
            calcParams: [20],
            figures: [{
                key: "cci",
                title: "CCI: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = t[0] - 1
                  , o = 0
                  , s = [];
                return r.map(function(u, c) {
                    var h = {}
                      , d = (u.high + u.low + u.close) / 3;
                    if (o += d,
                    s.push(d),
                    c >= i) {
                        var p = o / t[0]
                          , g = s.slice(c - i, c + 1)
                          , y = 0;
                        g.forEach(function(x) {
                            y += Math.abs(x - p)
                        });
                        var f = y / t[0];
                        h.cci = f !== 0 ? (d - p) / f / .015 : 0,
                        o -= (r[c - i].high + r[c - i].low + r[c - i].close) / 3
                    }
                    return h
                })
            }
        }, {
            name: "CR",
            shortName: "CR",
            calcParams: [26, 10, 20, 40, 60],
            figures: [{
                key: "cr",
                title: "CR: ",
                type: "line"
            }, {
                key: "ma1",
                title: "MA1: ",
                type: "line"
            }, {
                key: "ma2",
                title: "MA2: ",
                type: "line"
            }, {
                key: "ma3",
                title: "MA3: ",
                type: "line"
            }, {
                key: "ma4",
                title: "MA4: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = Math.ceil(t[1] / 2.5 + 1)
                  , o = Math.ceil(t[2] / 2.5 + 1)
                  , s = Math.ceil(t[3] / 2.5 + 1)
                  , u = Math.ceil(t[4] / 2.5 + 1)
                  , c = 0
                  , h = []
                  , d = 0
                  , p = []
                  , g = 0
                  , y = []
                  , f = 0
                  , x = []
                  , _ = [];
                return r.forEach(function(w, L) {
                    var M, k, E, D, F, N = {}, O = (M = r[L - 1]) !== null && M !== void 0 ? M : w, z = (O.high + O.close + O.low + O.open) / 4, U = Math.max(0, w.high - z), $ = Math.max(0, z - w.low);
                    t[0] - 1 > L || (N.cr = $ !== 0 ? U / $ * 100 : 0,
                    c += N.cr,
                    d += N.cr,
                    g += N.cr,
                    f += N.cr,
                    t[0] + t[1] - 2 > L || (h.push(c / t[1]),
                    t[0] + t[1] + i - 3 > L || (N.ma1 = h[h.length - 1 - i]),
                    c -= (k = _[L - (t[1] - 1)].cr) !== null && k !== void 0 ? k : 0),
                    t[0] + t[2] - 2 > L || (p.push(d / t[2]),
                    t[0] + t[2] + o - 3 > L || (N.ma2 = p[p.length - 1 - o]),
                    d -= (E = _[L - (t[2] - 1)].cr) !== null && E !== void 0 ? E : 0),
                    t[0] + t[3] - 2 > L || (y.push(g / t[3]),
                    t[0] + t[3] + s - 3 > L || (N.ma3 = y[y.length - 1 - s]),
                    g -= (D = _[L - (t[3] - 1)].cr) !== null && D !== void 0 ? D : 0),
                    t[0] + t[4] - 2 > L || (x.push(f / t[4]),
                    t[0] + t[4] + u - 3 > L || (N.ma4 = x[x.length - 1 - u]),
                    f -= (F = _[L - (t[4] - 1)].cr) !== null && F !== void 0 ? F : 0)),
                    _.push(N)
                }),
                _
            }
        }, {
            name: "DMA",
            shortName: "DMA",
            calcParams: [10, 50, 10],
            figures: [{
                key: "dma",
                title: "DMA: ",
                type: "line"
            }, {
                key: "ama",
                title: "AMA: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = Math.max(t[0], t[1])
                  , o = 0
                  , s = 0
                  , u = 0
                  , c = [];
                return r.forEach(function(h, d) {
                    var p, g = {}, y = h.close;
                    o += y,
                    s += y;
                    var f = 0
                      , x = 0;
                    if (t[0] - 1 > d || (f = o / t[0],
                    o -= r[d - (t[0] - 1)].close),
                    t[1] - 1 > d || (x = s / t[1],
                    s -= r[d - (t[1] - 1)].close),
                    d >= i - 1) {
                        var _ = f - x;
                        g.dma = _,
                        u += _,
                        i + t[2] - 2 > d || (g.ama = u / t[2],
                        u -= (p = c[d - (t[2] - 1)].dma) !== null && p !== void 0 ? p : 0)
                    }
                    c.push(g)
                }),
                c
            }
        }, {
            name: "DMI",
            shortName: "DMI",
            calcParams: [14, 6],
            figures: [{
                key: "pdi",
                title: "PDI: ",
                type: "line"
            }, {
                key: "mdi",
                title: "MDI: ",
                type: "line"
            }, {
                key: "adx",
                title: "ADX: ",
                type: "line"
            }, {
                key: "adxr",
                title: "ADXR: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = 0
                  , o = 0
                  , s = 0
                  , u = 0
                  , c = 0
                  , h = 0
                  , d = 0
                  , p = 0
                  , g = [];
                return r.forEach(function(y, f) {
                    var x, _, w = {}, L = (x = r[f - 1]) !== null && x !== void 0 ? x : y, M = L.close, k = y.high, E = y.low, D = k - E, F = Math.abs(k - M), N = Math.abs(M - E), O = k - L.high, z = L.low - E, U = Math.max(Math.max(D, F), N), $ = O > 0 && O > z ? O : 0, se = z > 0 && z > O ? z : 0;
                    if (i += U,
                    o += $,
                    s += se,
                    f >= t[0] - 1) {
                        f > t[0] - 1 ? (u = u - u / t[0] + U,
                        c = c - c / t[0] + $,
                        h = h - h / t[0] + se) : (u = i,
                        c = o,
                        h = s);
                        var te = 0
                          , ne = 0;
                        u !== 0 && (te = 100 * c / u,
                        ne = 100 * h / u),
                        w.pdi = te,
                        w.mdi = ne;
                        var ye = 0;
                        ne + te !== 0 && (ye = Math.abs(ne - te) / (ne + te) * 100),
                        d += ye,
                        2 * t[0] - 2 > f || (w.adx = p = f > 2 * t[0] - 2 ? (p * (t[0] - 1) + ye) / t[0] : d / t[0],
                        2 * t[0] + t[1] - 3 > f || (w.adxr = (((_ = g[f - (t[1] - 1)].adx) !== null && _ !== void 0 ? _ : 0) + p) / 2))
                    }
                    g.push(w)
                }),
                g
            }
        }, {
            name: "EMV",
            shortName: "EMV",
            calcParams: [14, 9],
            figures: [{
                key: "emv",
                title: "EMV: ",
                type: "line"
            }, {
                key: "maEmv",
                title: "MAEMV: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = 0
                  , o = 0
                  , s = []
                  , u = [];
                return r.forEach(function(c, h) {
                    var d, p, g, y = {}, f = (d = r[h - 1]) !== null && d !== void 0 ? d : c, x = c.high, _ = c.low, w = (p = c.turnover) !== null && p !== void 0 ? p : 0, L = 0;
                    w !== 0 && (L = ((x + _) / 2 - (f.high + f.low) / 2) * (x - _) / w),
                    s.push(L),
                    i += L,
                    t[0] - 1 > h || (y.emv = i,
                    i -= s[h - (t[0] - 1)],
                    o += y.emv,
                    t[0] + t[1] - 2 > h || (y.maEmv = o / t[1],
                    o -= (g = u[h - (t[1] - 1)].emv) !== null && g !== void 0 ? g : 0)),
                    u.push(y)
                }),
                u
            }
        }, p1, {
            name: "MTM",
            shortName: "MTM",
            calcParams: [12, 6],
            figures: [{
                key: "mtm",
                title: "MTM: ",
                type: "line"
            }, {
                key: "maMtm",
                title: "MAMTM: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = 0
                  , o = [];
                return r.forEach(function(s, u) {
                    var c, h = {};
                    u < t[0] || (h.mtm = s.close - r[u - t[0]].close,
                    i += h.mtm,
                    t[0] + t[1] - 1 > u || (h.maMtm = i / t[1],
                    i -= (c = o[u - (t[1] - 1)].mtm) !== null && c !== void 0 ? c : 0)),
                    o.push(h)
                }),
                o
            }
        }, g1, {
            name: "MACD",
            shortName: "MACD",
            calcParams: [12, 26, 9],
            figures: [{
                key: "dif",
                title: "DIF: ",
                type: "line"
            }, {
                key: "dea",
                title: "DEA: ",
                type: "line"
            }, {
                key: "macd",
                title: "MACD: ",
                type: "bar",
                baseValue: 0,
                styles: function(r, e, t) {
                    var i, o, s, u, c = (o = (i = r.prev.indicatorData) === null || i === void 0 ? void 0 : i.macd) !== null && o !== void 0 ? o : Number.MIN_SAFE_INTEGER, h = (u = (s = r.current.indicatorData) === null || s === void 0 ? void 0 : s.macd) !== null && u !== void 0 ? u : Number.MIN_SAFE_INTEGER;
                    return {
                        style: h > c ? "stroke" : "fill",
                        color: h > 0 ? ue(e.styles, "bars[0].upColor", t.bars[0].upColor) : 0 > h ? ue(e.styles, "bars[0].downColor", t.bars[0].downColor) : ue(e.styles, "bars[0].noChangeColor", t.bars[0].noChangeColor)
                    }
                }
            }],
            calc: function(r, e) {
                var t, i, o = e.calcParams, s = 0, u = 0, c = 0, h = 0, d = Math.max(o[0], o[1]);
                return r.map(function(p, g) {
                    var y = {}
                      , f = p.close;
                    return s += f,
                    o[0] - 1 > g || (t = g > o[0] - 1 ? (2 * f + (o[0] - 1) * t) / (o[0] + 1) : s / o[0]),
                    o[1] - 1 > g || (i = g > o[1] - 1 ? (2 * f + (o[1] - 1) * i) / (o[1] + 1) : s / o[1]),
                    d - 1 > g || (y.dif = u = t - i,
                    c += u,
                    d + o[2] - 2 > g || (y.macd = 2 * (u - (h = g > d + o[2] - 2 ? (2 * u + h * (o[2] - 1)) / (o[2] + 1) : c / o[2])),
                    y.dea = h)),
                    y
                })
            }
        }, {
            name: "OBV",
            shortName: "OBV",
            calcParams: [30],
            figures: [{
                key: "obv",
                title: "OBV: ",
                type: "line"
            }, {
                key: "maObv",
                title: "MAOBV: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = 0
                  , o = 0
                  , s = [];
                return r.forEach(function(u, c) {
                    var h, d, p, g, y = (h = r[c - 1]) !== null && h !== void 0 ? h : u;
                    y.close > u.close ? o -= (d = u.volume) !== null && d !== void 0 ? d : 0 : u.close > y.close && (o += (p = u.volume) !== null && p !== void 0 ? p : 0);
                    var f = {
                        obv: o
                    };
                    i += o,
                    t[0] - 1 > c || (f.maObv = i / t[0],
                    i -= (g = s[c - (t[0] - 1)].obv) !== null && g !== void 0 ? g : 0),
                    s.push(f)
                }),
                s
            }
        }, {
            name: "PVT",
            shortName: "PVT",
            figures: [{
                key: "pvt",
                title: "PVT: ",
                type: "line"
            }],
            calc: function(r) {
                var e = 0;
                return r.map(function(t, i) {
                    var o, s, u = {}, c = (o = t.volume) !== null && o !== void 0 ? o : 1, h = ((s = r[i - 1]) !== null && s !== void 0 ? s : t).close, d = 0, p = h * c;
                    return p !== 0 && (d = (t.close - h) / p),
                    u.pvt = e += d,
                    u
                })
            }
        }, {
            name: "PSY",
            shortName: "PSY",
            calcParams: [12, 6],
            figures: [{
                key: "psy",
                title: "PSY: ",
                type: "line"
            }, {
                key: "maPsy",
                title: "MAPSY: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = 0
                  , o = 0
                  , s = []
                  , u = [];
                return r.forEach(function(c, h) {
                    var d, p, g = {}, y = ((d = r[h - 1]) !== null && d !== void 0 ? d : c).close, f = c.close - y > 0 ? 1 : 0;
                    s.push(f),
                    i += f,
                    t[0] - 1 > h || (g.psy = i / t[0] * 100,
                    o += g.psy,
                    t[0] + t[1] - 2 > h || (g.maPsy = o / t[1],
                    o -= (p = u[h - (t[1] - 1)].psy) !== null && p !== void 0 ? p : 0),
                    i -= s[h - (t[0] - 1)]),
                    u.push(g)
                }),
                u
            }
        }, {
            name: "ROC",
            shortName: "ROC",
            calcParams: [12, 6],
            figures: [{
                key: "roc",
                title: "ROC: ",
                type: "line"
            }, {
                key: "maRoc",
                title: "MAROC: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = []
                  , o = 0;
                return r.forEach(function(s, u) {
                    var c, h, d = {};
                    if (u >= t[0] - 1) {
                        var p = ((c = r[u - t[0]]) !== null && c !== void 0 ? c : r[u - (t[0] - 1)]).close;
                        d.roc = p !== 0 ? (s.close - p) / p * 100 : 0,
                        o += d.roc,
                        t[0] - 1 + t[1] - 1 > u || (d.maRoc = o / t[1],
                        o -= (h = i[u - (t[1] - 1)].roc) !== null && h !== void 0 ? h : 0)
                    }
                    i.push(d)
                }),
                i
            }
        }, v1, {
            name: "SMA",
            shortName: "SMA",
            series: a.IndicatorSeries.Price,
            calcParams: [12, 2],
            precision: 2,
            figures: [{
                key: "sma",
                title: "SMA: ",
                type: "line"
            }],
            shouldOhlc: !0,
            calc: function(r, e) {
                var t = e.calcParams
                  , i = 0
                  , o = 0;
                return r.map(function(s, u) {
                    var c = {}
                      , h = s.close;
                    return i += h,
                    t[0] - 1 > u || (c.sma = o = u > t[0] - 1 ? (h * t[1] + o * (t[0] - t[1] + 1)) / (t[0] + 1) : i / t[0]),
                    c
                })
            }
        }, {
            name: "KDJ",
            shortName: "KDJ",
            calcParams: [9, 3, 3],
            figures: [{
                key: "k",
                title: "K: ",
                type: "line"
            }, {
                key: "d",
                title: "D: ",
                type: "line"
            }, {
                key: "j",
                title: "J: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = [];
                return r.forEach(function(o, s) {
                    var u, c, h, d, p = {}, g = o.close;
                    if (s >= t[0] - 1) {
                        var y = Ct(r.slice(s - (t[0] - 1), s + 1), "high", "low")
                          , f = y[1]
                          , x = y[0] - f;
                        p.k = ((t[1] - 1) * ((c = (u = i[s - 1]) === null || u === void 0 ? void 0 : u.k) !== null && c !== void 0 ? c : 50) + (g - f) / (x === 0 ? 1 : x) * 100) / t[1],
                        p.d = ((t[2] - 1) * ((d = (h = i[s - 1]) === null || h === void 0 ? void 0 : h.d) !== null && d !== void 0 ? d : 50) + p.k) / t[2],
                        p.j = 3 * p.k - 2 * p.d
                    }
                    i.push(p)
                }),
                i
            }
        }, {
            name: "SAR",
            shortName: "SAR",
            series: a.IndicatorSeries.Price,
            calcParams: [2, 2, 20],
            precision: 2,
            shouldOhlc: !0,
            figures: [{
                key: "sar",
                title: "SAR: ",
                type: "circle",
                styles: function(r, e, t) {
                    var i, o, s = r.current, u = (o = (i = s.indicatorData) === null || i === void 0 ? void 0 : i.sar) !== null && o !== void 0 ? o : Number.MIN_SAFE_INTEGER, c = s.kLineData;
                    return {
                        color: ((c == null ? void 0 : c.high) + (c == null ? void 0 : c.low)) / 2 > u ? ue(e.styles, "circles[0].upColor", t.circles[0].upColor) : ue(e.styles, "circles[0].downColor", t.circles[0].downColor)
                    }
                }
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = t[0] / 100
                  , o = t[1] / 100
                  , s = t[2] / 100
                  , u = i
                  , c = -100
                  , h = !1
                  , d = 0;
                return r.map(function(p, g) {
                    var y = d
                      , f = p.high
                      , x = p.low;
                    if (h) {
                        (c === -100 || f > c) && (c = f,
                        u = Math.min(u + o, s)),
                        d = y + u * (c - y);
                        var _ = Math.min(r[Math.max(1, g) - 1].low, x);
                        d > p.low ? (d = c,
                        u = i,
                        c = -100,
                        h = !h) : d > _ && (d = _)
                    } else {
                        (c === -100 || c > x) && (c = x,
                        u = Math.min(u + o, s)),
                        d = y + u * (c - y);
                        var w = Math.max(r[Math.max(1, g) - 1].high, f);
                        p.high > d ? (d = c,
                        u = 0,
                        c = -100,
                        h = !h) : w > d && (d = w)
                    }
                    return {
                        sar: d
                    }
                })
            }
        }, {
            name: "TRIX",
            shortName: "TRIX",
            calcParams: [12, 9],
            figures: [{
                key: "trix",
                title: "TRIX: ",
                type: "line"
            }, {
                key: "maTrix",
                title: "MATRIX: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t, i, o, s = e.calcParams, u = 0, c = 0, h = 0, d = 0, p = [];
                return r.forEach(function(g, y) {
                    var f, x = {}, _ = g.close;
                    if (u += _,
                    y >= s[0] - 1 && (c += t = y > s[0] - 1 ? (2 * _ + (s[0] - 1) * t) / (s[0] + 1) : u / s[0],
                    y >= 2 * s[0] - 2 && (h += i = y > 2 * s[0] - 2 ? (2 * t + (s[0] - 1) * i) / (s[0] + 1) : c / s[0],
                    y >= 3 * s[0] - 3))) {
                        var w = void 0
                          , L = 0;
                        y > 3 * s[0] - 3 ? L = ((w = (2 * i + (s[0] - 1) * o) / (s[0] + 1)) - o) / o * 100 : w = h / s[0],
                        o = w,
                        x.trix = L,
                        d += L,
                        3 * s[0] + s[1] - 4 > y || (x.maTrix = d / s[1],
                        d -= (f = p[y - (s[1] - 1)].trix) !== null && f !== void 0 ? f : 0)
                    }
                    p.push(x)
                }),
                p
            }
        }, f1, {
            name: "VR",
            shortName: "VR",
            calcParams: [26, 6],
            figures: [{
                key: "vr",
                title: "VR: ",
                type: "line"
            }, {
                key: "maVr",
                title: "MAVR: ",
                type: "line"
            }],
            calc: function(r, e) {
                var t = e.calcParams
                  , i = 0
                  , o = 0
                  , s = 0
                  , u = 0
                  , c = [];
                return r.forEach(function(h, d) {
                    var p, g, y, f, x, _ = {}, w = h.close, L = ((p = r[d - 1]) !== null && p !== void 0 ? p : h).close, M = (g = h.volume) !== null && g !== void 0 ? g : 0;
                    if (w > L ? i += M : L > w ? o += M : s += M,
                    d >= t[0] - 1) {
                        var k = s / 2;
                        _.vr = o + k === 0 ? 0 : (i + k) / (o + k) * 100,
                        u += _.vr,
                        t[0] + t[1] - 2 > d || (_.maVr = u / t[1],
                        u -= (y = c[d - (t[1] - 1)].vr) !== null && y !== void 0 ? y : 0);
                        var E = r[d - (t[0] - 1)]
                          , D = (f = r[d - t[0]]) !== null && f !== void 0 ? f : E
                          , F = E.close
                          , N = (x = E.volume) !== null && x !== void 0 ? x : 0;
                        F > D.close ? i -= N : D.close > F ? o -= N : s -= N
                    }
                    c.push(_)
                }),
                c
            }
        }, y1];
        function Qi(r) {
            var e;
            return (e = Cn[r]) !== null && e !== void 0 ? e : null
        }
        m1.forEach(function(r) {
            Cn[r.name] = Wi.extend(r)
        });
        var Jn, C1 = function() {
            function r(e) {
                this._instances = new Map,
                this._chartStore = e
            }
            return r.prototype._overrideInstance = function(e, t) {
                var i = t.shortName
                  , o = t.series
                  , s = t.calcParams
                  , u = t.precision
                  , c = t.figures
                  , h = t.minValue
                  , d = t.maxValue
                  , p = t.shouldOhlc
                  , g = t.shouldFormatBigNumber
                  , y = t.visible
                  , f = t.styles
                  , x = t.extendData
                  , _ = t.regenerateFigures
                  , w = t.createTooltipDataSource
                  , L = t.draw
                  , M = t.calc
                  , k = !1;
                i !== void 0 && e.setShortName(i) && (k = !0),
                o !== void 0 && e.setSeries(o) && (k = !0);
                var E = !1;
                return s !== void 0 && e.setCalcParams(s) && (k = !0,
                E = !0),
                c !== void 0 && e.setFigures(c) && (k = !0,
                E = !0),
                h !== void 0 && e.setMinValue(h) && (k = !0),
                d !== void 0 && e.setMinValue(d) && (k = !0),
                u !== void 0 && e.setPrecision(u) && (k = !0),
                p !== void 0 && e.setShouldOhlc(p) && (k = !0),
                g !== void 0 && e.setShouldFormatBigNumber(g) && (k = !0),
                y !== void 0 && e.setVisible(y) && (k = !0),
                f !== void 0 && e.setStyles(f) && (k = !0),
                x !== void 0 && e.setExtendData(x) && (k = !0,
                E = !0),
                _ !== void 0 && e.setRegenerateFigures(_) && (k = !0),
                w !== void 0 && e.setCreateTooltipDataSource(w) && (k = !0),
                L !== void 0 && e.setDraw(L) && (k = !0),
                M !== void 0 && (e.calc = M,
                E = !0),
                [k, E]
            }
            ,
            r.prototype.addInstance = function(e, t, i) {
                var o;
                return dt(this, void 0, void 0, function() {
                    var s, u, c, h;
                    return pt(this, function(d) {
                        switch (d.label) {
                        case 0:
                            return s = e.name,
                            u = this._instances.get(t),
                            (o = u == null ? void 0 : u.has(s)) !== null && o !== void 0 && o ? [4, Promise.reject(Error("Duplicate indicators."))] : [3, 2];
                        case 1:
                        case 3:
                            return [2, d.sent()];
                        case 2:
                            return u === void 0 && (u = new Map,
                            this._instances.set(t, u)),
                            c = Qi(s),
                            h = new c,
                            this._overrideInstance(h, e),
                            i || u.clear(),
                            u.set(s, h),
                            [4, h.calcIndicator(this._chartStore.getDataList())]
                        }
                    })
                })
            }
            ,
            r.prototype.getInstances = function(e) {
                var t;
                return (t = this._instances.get(e)) !== null && t !== void 0 ? t : new Map
            }
            ,
            r.prototype.removeInstance = function(e, t) {
                var i = !1
                  , o = this._instances.get(e);
                return o !== void 0 && (t !== void 0 ? o.has(t) && (o.delete(t),
                i = !0) : (o.clear(),
                i = !0),
                o.size === 0 && this._instances.delete(e)),
                i
            }
            ,
            r.prototype.hasInstances = function(e) {
                return this._instances.has(e)
            }
            ,
            r.prototype.calcInstance = function(e, t) {
                var i;
                return dt(this, void 0, void 0, function() {
                    var o, s, u, c = this;
                    return pt(this, function(h) {
                        switch (h.label) {
                        case 0:
                            return o = [],
                            e !== void 0 ? t !== void 0 ? (s = this._instances.get(t),
                            (i = s == null ? void 0 : s.has(e)) !== null && i !== void 0 && i && (u = s == null ? void 0 : s.get(e),
                            o.push(u.calcIndicator(this._chartStore.getDataList())))) : this._instances.forEach(function(d) {
                                if (d.has(e)) {
                                    var p = d == null ? void 0 : d.get(e);
                                    o.push(p.calcIndicator(c._chartStore.getDataList()))
                                }
                            }) : this._instances.forEach(function(d) {
                                d.forEach(function(p) {
                                    o.push(p.calcIndicator(c._chartStore.getDataList()))
                                })
                            }),
                            [4, Promise.all(o)];
                        case 1:
                            return [2, h.sent().includes(!0)]
                        }
                    })
                })
            }
            ,
            r.prototype.getInstanceByPaneId = function(e, t) {
                var i;
                if (e !== void 0) {
                    var o = this._instances.get(e);
                    return t !== void 0 ? (i = o == null ? void 0 : o.get(t)) !== null && i !== void 0 ? i : null : o ?? null
                }
                return this._instances
            }
            ,
            r.prototype.setSeriesPrecision = function(e) {
                this._instances.forEach(function(t) {
                    t.forEach(function(i) {
                        i.series === a.IndicatorSeries.Price && i.setPrecision(e.price, !0),
                        i.series === a.IndicatorSeries.Volume && i.setPrecision(e.volume, !0)
                    })
                })
            }
            ,
            r.prototype.override = function(e, t) {
                return dt(this, void 0, void 0, function() {
                    var i, o, s, u, c, h, d = this;
                    return pt(this, function(p) {
                        switch (p.label) {
                        case 0:
                            return i = e.name,
                            o = new Map,
                            t !== null ? (s = this._instances.get(t)) !== void 0 && o.set(t, s) : o = this._instances,
                            u = !1,
                            c = [],
                            o.forEach(function(g) {
                                var y = g.get(i);
                                if (y !== void 0) {
                                    var f = d._overrideInstance(y, e);
                                    f[1] ? c.push(y.calcIndicator(d._chartStore.getDataList())) : f[0] && (u = !0)
                                }
                            }),
                            [4, Promise.all(c)];
                        case 1:
                            return h = p.sent(),
                            [2, [u, h.includes(!0)]]
                        }
                    })
                })
            }
            ,
            r
        }(), x1 = function() {
            function r(e) {
                this._crosshair = {},
                this._chartStore = e
            }
            return r.prototype.set = function(e, t) {
                var i, o, s = this._chartStore.getDataList(), u = e ?? {}, c = s[o = u.x !== void 0 ? 0 > (i = this._chartStore.getTimeScaleStore().coordinateToDataIndex(u.x)) ? 0 : i > s.length - 1 ? s.length - 1 : i : i = s.length - 1], h = this._chartStore.getTimeScaleStore().dataIndexToCoordinate(i), d = this._crosshair.x, p = this._crosshair.y, g = this._crosshair.paneId;
                return this._crosshair = X(X({}, u), {
                    realX: h,
                    kLineData: c,
                    realDataIndex: i,
                    dataIndex: o
                }),
                d === u.x && p === u.y && g === u.paneId || (c !== null && this._chartStore.getChart().crosshairChange(this._crosshair),
                t != null && t || this._chartStore.getChart().updatePane(1)),
                this
            }
            ,
            r.prototype.recalculate = function(e) {
                this.set(this._crosshair, e)
            }
            ,
            r.prototype.get = function() {
                return this._crosshair
            }
            ,
            r
        }(), _1 = function() {
            function r() {
                this._activeIconInfo = null
            }
            return r.prototype.setActiveIconInfo = function(e) {
                this._activeIconInfo = e ?? null
            }
            ,
            r.prototype.getActiveIconInfo = function() {
                return this._activeIconInfo
            }
            ,
            r
        }();
        a.OverlayMode = void 0,
        (Jn = a.OverlayMode || (a.OverlayMode = {})).Normal = "normal",
        Jn.WeakMagnet = "weak_magnet",
        Jn.StrongMagnet = "strong_magnet";
        var an = "overlay_figure_"
          , Ki = function() {
            function r(e) {
                this.currentStep = 1,
                this.points = [],
                this._prevPressedPoint = null,
                this._prevPressedPoints = [];
                var t = e.mode
                  , i = e.extendData
                  , o = e.styles
                  , s = e.totalStep
                  , u = e.lock
                  , c = e.visible
                  , h = e.needDefaultPointFigure
                  , d = e.needDefaultXAxisFigure
                  , p = e.needDefaultYAxisFigure
                  , g = e.createPointFigures
                  , y = e.createXAxisFigures
                  , f = e.createYAxisFigures
                  , x = e.performEventPressedMove
                  , _ = e.performEventMoveForDrawing
                  , w = e.onDrawStart
                  , L = e.onDrawing
                  , M = e.onDrawEnd
                  , k = e.onClick
                  , E = e.onRightClick
                  , D = e.onPressedMoveStart
                  , F = e.onPressedMoving
                  , N = e.onPressedMoveEnd
                  , O = e.onMouseEnter
                  , z = e.onMouseLeave
                  , U = e.onRemoved
                  , $ = e.onSelected
                  , se = e.onDeselected;
                this.name = e.name,
                this.totalStep = s === void 0 || 2 > s ? 1 : s,
                this.lock = u != null && u,
                this.visible = c == null || c,
                this.needDefaultPointFigure = h != null && h,
                this.needDefaultXAxisFigure = d != null && d,
                this.needDefaultYAxisFigure = p != null && p,
                this.mode = t ?? a.OverlayMode.Normal,
                this.extendData = i,
                this.styles = o ?? null,
                this.createPointFigures = g ?? null,
                this.createXAxisFigures = y ?? null,
                this.createYAxisFigures = f ?? null,
                this.performEventPressedMove = x ?? null,
                this.performEventMoveForDrawing = _ ?? null,
                this.onDrawStart = w ?? null,
                this.onDrawing = L ?? null,
                this.onDrawEnd = M ?? null,
                this.onClick = k ?? null,
                this.onRightClick = E ?? null,
                this.onPressedMoveStart = D ?? null,
                this.onPressedMoving = F ?? null,
                this.onPressedMoveEnd = N ?? null,
                this.onMouseEnter = O ?? null,
                this.onMouseLeave = z ?? null,
                this.onRemoved = U ?? null,
                this.onSelected = $ ?? null,
                this.onDeselected = se ?? null
            }
            return r.prototype.setId = function(e) {
                return this.id === void 0 && (this.id = e,
                !0)
            }
            ,
            r.prototype.setGroupId = function(e) {
                return this.groupId === void 0 && (this.groupId = e,
                !0)
            }
            ,
            r.prototype.setExtendData = function(e) {
                return e !== this.extendData && (this.extendData = e,
                !0)
            }
            ,
            r.prototype.setStyles = function(e) {
                return e !== this.styles && (this.styles = e,
                !0)
            }
            ,
            r.prototype.setPoints = function(e) {
                if (e.length > 0) {
                    var t = void 0;
                    if (this.points = Te([], q(e), !1),
                    this.totalStep - 1 > e.length ? (this.currentStep = e.length + 1,
                    t = e.length) : (this.currentStep = -1,
                    t = this.totalStep - 1),
                    this.performEventMoveForDrawing !== null)
                        for (var i = 0; t > i; i++)
                            this.performEventMoveForDrawing({
                                currentStep: i + 2,
                                mode: this.mode,
                                points: this.points,
                                performPointIndex: i,
                                performPoint: this.points[i]
                            });
                    return this.currentStep === -1 && this.performEventPressedMove !== null && this.performEventPressedMove({
                        currentStep: this.currentStep,
                        mode: this.mode,
                        points: this.points,
                        performPointIndex: this.points.length - 1,
                        performPoint: this.points[this.points.length - 1]
                    }),
                    !0
                }
                return !1
            }
            ,
            r.prototype.setLock = function(e) {
                return this.lock !== e && (this.lock = e,
                !0)
            }
            ,
            r.prototype.setVisible = function(e) {
                return this.visible !== e && (this.visible = e,
                !0)
            }
            ,
            r.prototype.setMode = function(e) {
                return e !== this.mode && (this.mode = e,
                !0)
            }
            ,
            r.prototype.setOnDrawStartCallback = function(e) {
                return this.onDrawStart !== e && (this.onDrawStart = e,
                !0)
            }
            ,
            r.prototype.setOnDrawingCallback = function(e) {
                return this.onDrawing !== e && (this.onDrawing = e,
                !0)
            }
            ,
            r.prototype.setOnDrawEndCallback = function(e) {
                return this.onDrawEnd !== e && (this.onDrawEnd = e,
                !0)
            }
            ,
            r.prototype.setOnClickCallback = function(e) {
                return this.onClick !== e && (this.onClick = e,
                !0)
            }
            ,
            r.prototype.setOnRightClickCallback = function(e) {
                return this.onRightClick !== e && (this.onRightClick = e,
                !0)
            }
            ,
            r.prototype.setOnPressedMoveStartCallback = function(e) {
                return this.onPressedMoveStart !== e && (this.onPressedMoveStart = e,
                !0)
            }
            ,
            r.prototype.setOnPressedMovingCallback = function(e) {
                return this.onPressedMoving !== e && (this.onPressedMoving = e,
                !0)
            }
            ,
            r.prototype.setOnPressedMoveEndCallback = function(e) {
                return this.onPressedMoveEnd !== e && (this.onPressedMoveEnd = e,
                !0)
            }
            ,
            r.prototype.setOnMouseEnterCallback = function(e) {
                return this.onMouseEnter !== e && (this.onMouseEnter = e,
                !0)
            }
            ,
            r.prototype.setOnMouseLeaveCallback = function(e) {
                return this.onMouseLeave !== e && (this.onMouseLeave = e,
                !0)
            }
            ,
            r.prototype.setOnRemovedCallback = function(e) {
                return this.onRemoved !== e && (this.onRemoved = e,
                !0)
            }
            ,
            r.prototype.setOnSelectedCallback = function(e) {
                return this.onSelected !== e && (this.onSelected = e,
                !0)
            }
            ,
            r.prototype.setOnDeselectedCallback = function(e) {
                return this.onDeselected !== e && (this.onDeselected = e,
                !0)
            }
            ,
            r.prototype.nextStep = function() {
                this.currentStep === this.totalStep - 1 ? this.currentStep = -1 : this.currentStep++
            }
            ,
            r.prototype.forceComplete = function() {
                this.currentStep = -1
            }
            ,
            r.prototype.isDrawing = function() {
                return this.currentStep !== -1
            }
            ,
            r.prototype.isStart = function() {
                return this.currentStep === 1
            }
            ,
            r.prototype.eventMoveForDrawing = function(e) {
                var t, i = this.currentStep - 1, o = {};
                e.timestamp !== void 0 && (o.timestamp = e.timestamp),
                e.dataIndex !== void 0 && (o.dataIndex = e.dataIndex),
                e.value !== void 0 && (o.value = e.value),
                this.points[i] = o,
                (t = this.performEventMoveForDrawing) === null || t === void 0 || t.call(this, {
                    currentStep: this.currentStep,
                    mode: this.mode,
                    points: this.points,
                    performPointIndex: i,
                    performPoint: o
                })
            }
            ,
            r.prototype.eventPressedPointMove = function(e, t) {
                var i;
                e.dataIndex !== void 0 && (this.points[t].dataIndex = e.dataIndex,
                this.points[t].timestamp = e.timestamp),
                e.value !== void 0 && (this.points[t].value = e.value),
                (i = this.performEventPressedMove) === null || i === void 0 || i.call(this, {
                    currentStep: this.currentStep,
                    points: this.points,
                    mode: this.mode,
                    performPointIndex: t,
                    performPoint: this.points[t]
                })
            }
            ,
            r.prototype.startPressedMove = function(e) {
                this._prevPressedPoint = X({}, e),
                this._prevPressedPoints = m(this.points)
            }
            ,
            r.prototype.eventPressedOtherMove = function(e, t) {
                var i, o;
                this._prevPressedPoint !== null && (e.dataIndex !== void 0 && this._prevPressedPoint.dataIndex !== void 0 && (i = e.dataIndex - this._prevPressedPoint.dataIndex),
                e.value !== void 0 && this._prevPressedPoint.value !== void 0 && (o = e.value - this._prevPressedPoint.value),
                this.points = this._prevPressedPoints.map(function(s) {
                    var u;
                    s.dataIndex === void 0 && s.timestamp !== void 0 && (s.dataIndex = t.timestampToDataIndex(s.timestamp));
                    var c = X({}, s);
                    return i !== void 0 && s.dataIndex !== void 0 && (c.dataIndex = s.dataIndex + i,
                    c.timestamp = (u = t.dataIndexToTimestamp(c.dataIndex)) !== null && u !== void 0 ? u : void 0),
                    o !== void 0 && s.value !== void 0 && (c.value = s.value + o),
                    c
                }))
            }
            ,
            r.extend = function(e) {
                return function(t) {
                    function i() {
                        return t.call(this, e) || this
                    }
                    return ee(i, t),
                    i
                }(r)
            }
            ,
            r
        }();
        function Zi(r, e) {
            return Math.sqrt(Math.pow(r.x + e.x, 2) + Math.pow(r.y + e.y, 2))
        }
        function b1(r) {
            var e = Zi(r[0], r[1])
              , t = e + Zi(r[1], r[2])
              , i = [r[2].x - r[0].x, r[2].y - r[0].y];
            return [{
                x: r[1].x - .5 * i[0] * e / t,
                y: r[1].y - .5 * i[1] * e / t
            }, {
                x: r[1].x + .5 * i[0] * e / t,
                y: r[1].y + .5 * i[1] * e / t
            }]
        }
        function Hi(r, e) {
            var t = e.coordinates;
            if (t.length > 1)
                for (var i = 1; t.length > i; i++) {
                    var o = t[i - 1]
                      , s = t[i];
                    if (o.x === s.x) {
                        if (4 > Math.abs(o.y - r.y) + Math.abs(s.y - r.y) - Math.abs(o.y - s.y) && 2 > Math.abs(r.x - o.x))
                            return !0
                    } else {
                        var u = xn(o, s)
                          , c = qn(u, r)
                          , h = Math.abs(c - r.y);
                        if (4 > Math.abs(o.x - r.x) + Math.abs(s.x - r.x) - Math.abs(o.x - s.x) && 4 > h * h / (u[0] * u[0] + 1))
                            return !0
                    }
                }
            return !1
        }
        function qn(r, e) {
            return r != null ? e.x * r[0] + r[1] : e.y
        }
        function sn(r, e, t) {
            return qn(xn(r, e), t)
        }
        function xn(r, e) {
            var t = r.x - e.x;
            if (t !== 0) {
                var i = (r.y - e.y) / t;
                return [i, r.y - i * r.x]
            }
            return null
        }
        function Ui(r, e, t) {
            var i = e.coordinates
              , o = i.length;
            if (o > 1) {
                var s = t.style
                  , u = s === void 0 ? a.LineType.Solid : s
                  , c = t.smooth
                  , h = t.size
                  , d = t.color
                  , p = d === void 0 ? "currentColor" : d
                  , g = t.dashedValue
                  , y = g === void 0 ? [2, 2] : g;
                if (r.lineWidth = h === void 0 ? 1 : h,
                r.strokeStyle = p,
                r.setLineDash(u === a.LineType.Dashed ? y : []),
                r.beginPath(),
                r.moveTo(i[0].x, i[0].y),
                c != null && c) {
                    for (var f = [], x = 1; o - 1 > x; x++)
                        f = f.concat(b1([i[x - 1], i[x], i[x + 1]]));
                    r.quadraticCurveTo(f[0].x, f[0].y, i[1].x, i[1].y);
                    for (var _ = 2; o - 1 > _; _++)
                        r.bezierCurveTo(f[2 * (_ - 2) + 1].x, f[2 * (_ - 2) + 1].y, f[2 * (_ - 1)].x, f[2 * (_ - 1)].y, i[_].x, i[_].y);
                    r.quadraticCurveTo(f[2 * (_ - 2) + 1].x, f[2 * (_ - 2) + 1].y, i[_].x, i[_].y)
                } else
                    for (_ = 1; i.length > _; _++)
                        r.lineTo(i[_].x, i[_].y);
                r.stroke(),
                r.closePath()
            }
        }
        var w1 = {
            name: "line",
            checkEventOn: Hi,
            draw: function(r, e, t) {
                Ui(r, e, t)
            }
        };
        function Xi(r, e, t) {
            var i = t ?? 0
              , o = [];
            if (r.length > 1)
                if (r[0].x === r[1].x) {
                    var s = e.height;
                    if (o.push({
                        coordinates: [{
                            x: r[0].x,
                            y: 0
                        }, {
                            x: r[0].x,
                            y: s
                        }]
                    }),
                    r.length > 2) {
                        o.push({
                            coordinates: [{
                                x: r[2].x,
                                y: 0
                            }, {
                                x: r[2].x,
                                y: s
                            }]
                        });
                        for (var u = r[0].x - r[2].x, c = 0; i > c; c++) {
                            var h = u * (c + 1);
                            o.push({
                                coordinates: [{
                                    x: r[0].x + h,
                                    y: 0
                                }, {
                                    x: r[0].x + h,
                                    y: s
                                }]
                            })
                        }
                    }
                } else {
                    var d = e.width
                      , p = xn(r[0], r[1])
                      , g = p[0]
                      , y = p[1];
                    if (o.push({
                        coordinates: [{
                            x: 0,
                            y: 0 * g + y
                        }, {
                            x: d,
                            y: d * g + y
                        }]
                    }),
                    r.length > 2) {
                        var f = r[2].y - g * r[2].x;
                        for (o.push({
                            coordinates: [{
                                x: 0,
                                y: 0 * g + f
                            }, {
                                x: d,
                                y: d * g + f
                            }]
                        }),
                        u = y - f,
                        c = 0; i > c; c++) {
                            var x = y + u * (c + 1);
                            o.push({
                                coordinates: [{
                                    x: 0,
                                    y: 0 * g + x
                                }, {
                                    x: d,
                                    y: d * g + x
                                }]
                            })
                        }
                    }
                }
            return o
        }
        function S1(r, e) {
            if (r.length > 1) {
                var t = void 0;
                return t = r[0].x === r[1].x && r[0].y !== r[1].y ? r[1].y > r[0].y ? {
                    x: r[0].x,
                    y: e.height
                } : {
                    x: r[0].x,
                    y: 0
                } : r[0].x > r[1].x ? {
                    x: 0,
                    y: sn(r[0], r[1], {
                        x: 0,
                        y: r[0].y
                    })
                } : {
                    x: e.width,
                    y: sn(r[0], r[1], {
                        x: e.width,
                        y: r[0].y
                    })
                },
                {
                    coordinates: [r[0], t]
                }
            }
            return []
        }
        var L1 = {
            name: "simpleAnnotation",
            totalStep: 2,
            createPointFigures: function(r) {
                var e, t, i = r.overlay, o = r.coordinates;
                T(i.extendData) && (t = S(i.extendData) ? i.extendData(i) : (e = i.extendData) !== null && e !== void 0 ? e : "");
                var s = o[0].x
                  , u = o[0].y - 6
                  , c = u - 50
                  , h = c - 5;
                return [{
                    type: "line",
                    attrs: {
                        coordinates: [{
                            x: s,
                            y: u
                        }, {
                            x: s,
                            y: c
                        }]
                    },
                    ignoreEvent: !0
                }, {
                    type: "polygon",
                    attrs: {
                        coordinates: [{
                            x: s,
                            y: c
                        }, {
                            x: s - 4,
                            y: h
                        }, {
                            x: s + 4,
                            y: h
                        }]
                    },
                    ignoreEvent: !0
                }, {
                    type: "rectText",
                    attrs: {
                        x: s,
                        y: h,
                        text: t ?? "",
                        align: "center",
                        baseline: "bottom"
                    },
                    ignoreEvent: !0
                }]
            }
        }
          , k1 = {
            name: "simpleTag",
            totalStep: 2,
            createPointFigures: function(r) {
                var e = r.coordinates;
                return {
                    type: "line",
                    attrs: {
                        coordinates: [{
                            x: 0,
                            y: e[0].y
                        }, {
                            x: r.bounding.width,
                            y: e[0].y
                        }]
                    },
                    ignoreEvent: !0
                }
            },
            createYAxisFigures: function(r) {
                var e, t, i, o, s, u = r.overlay, c = r.coordinates, h = r.bounding, d = r.yAxis, p = r.precision;
                return (e = d == null ? void 0 : d.isFromZero()) !== null && e !== void 0 && e ? (i = "left",
                o = 0) : (i = "right",
                o = h.width),
                T(u.extendData) && (s = S(u.extendData) ? u.extendData(u) : (t = u.extendData) !== null && t !== void 0 ? t : ""),
                T(s) || u.points[0].value === void 0 || (s = G(u.points[0].value, p.price)),
                {
                    type: "rectText",
                    attrs: {
                        x: o,
                        y: c[0].y,
                        text: s ?? "",
                        align: i,
                        baseline: "middle"
                    }
                }
            }
        }
          , _n = {};
        function Gi(r) {
            var e;
            return (e = _n[r]) !== null && e !== void 0 ? e : null
        }
        function $i(r) {
            var e = {
                width: 0,
                height: 0,
                left: 0,
                right: 0,
                top: 0,
                bottom: 0
            };
            return r !== void 0 && v(e, r),
            e
        }
        [{
            name: "fibonacciLine",
            totalStep: 3,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                var e = r.coordinates
                  , t = r.precision
                  , i = r.thousandsSeparator
                  , o = r.overlay.points;
                if (e.length > 0) {
                    var s = []
                      , u = []
                      , c = r.bounding.width;
                    if (e.length > 1 && o[0].value !== void 0 && o[1].value !== void 0) {
                        var h = e[0].y - e[1].y
                          , d = o[0].value - o[1].value;
                        [1, .786, .618, .5, .382, .236, 0].forEach(function(p) {
                            var g, y = e[1].y + h * p, f = Ce((((g = o[1].value) !== null && g !== void 0 ? g : 0) + d * p).toFixed(t.price), i);
                            s.push({
                                coordinates: [{
                                    x: 0,
                                    y
                                }, {
                                    x: c,
                                    y
                                }]
                            }),
                            u.push({
                                x: 0,
                                y,
                                text: "".concat(f, " (").concat((100 * p).toFixed(1), "%)"),
                                baseline: "bottom"
                            })
                        })
                    }
                    return [{
                        type: "line",
                        attrs: s
                    }, {
                        type: "text",
                        isCheckEvent: !1,
                        attrs: u
                    }]
                }
                return []
            }
        }, {
            name: "horizontalRayLine",
            totalStep: 3,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                var e = r.coordinates
                  , t = {
                    x: 0,
                    y: e[0].y
                };
                return e[1] !== void 0 && e[1].x > e[0].x && (t.x = r.bounding.width),
                [{
                    type: "line",
                    attrs: {
                        coordinates: [e[0], t]
                    }
                }]
            },
            performEventPressedMove: function(r) {
                var e = r.points
                  , t = r.performPoint;
                e[0].value = t.value,
                e[1].value = t.value
            },
            performEventMoveForDrawing: function(r) {
                r.currentStep === 2 && (r.points[0].value = r.performPoint.value)
            }
        }, {
            name: "horizontalSegment",
            totalStep: 3,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                var e = r.coordinates
                  , t = [];
                return e.length === 2 && t.push({
                    coordinates: e
                }),
                [{
                    type: "line",
                    attrs: t
                }]
            },
            performEventPressedMove: function(r) {
                var e = r.points
                  , t = r.performPoint;
                e[0].value = t.value,
                e[1].value = t.value
            },
            performEventMoveForDrawing: function(r) {
                r.currentStep === 2 && (r.points[0].value = r.performPoint.value)
            }
        }, {
            name: "horizontalStraightLine",
            totalStep: 2,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                var e = r.coordinates;
                return [{
                    type: "line",
                    attrs: {
                        coordinates: [{
                            x: 0,
                            y: e[0].y
                        }, {
                            x: r.bounding.width,
                            y: e[0].y
                        }]
                    }
                }]
            }
        }, {
            name: "parallelStraightLine",
            totalStep: 4,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                return [{
                    type: "line",
                    attrs: Xi(r.coordinates, r.bounding)
                }]
            }
        }, {
            name: "priceChannelLine",
            totalStep: 4,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                return [{
                    type: "line",
                    attrs: Xi(r.coordinates, r.bounding, 1)
                }]
            }
        }, {
            name: "priceLine",
            totalStep: 2,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                var e = r.coordinates
                  , t = r.thousandsSeparator
                  , i = r.overlay.points[0].value;
                return [{
                    type: "line",
                    attrs: {
                        coordinates: [e[0], {
                            x: r.bounding.width,
                            y: e[0].y
                        }]
                    }
                }, {
                    type: "text",
                    ignoreEvent: !0,
                    attrs: {
                        x: e[0].x,
                        y: e[0].y,
                        text: Ce((i === void 0 ? 0 : i).toFixed(r.precision.price), t),
                        baseline: "bottom"
                    }
                }]
            }
        }, {
            name: "rayLine",
            totalStep: 3,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                return [{
                    type: "line",
                    attrs: S1(r.coordinates, r.bounding)
                }]
            }
        }, {
            name: "segment",
            totalStep: 3,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                var e = r.coordinates;
                return e.length === 2 ? [{
                    type: "line",
                    attrs: {
                        coordinates: e
                    }
                }] : []
            }
        }, {
            name: "straightLine",
            totalStep: 3,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                var e = r.coordinates
                  , t = r.bounding;
                return e.length === 2 ? e[0].x === e[1].x ? [{
                    type: "line",
                    attrs: {
                        coordinates: [{
                            x: e[0].x,
                            y: 0
                        }, {
                            x: e[0].x,
                            y: t.height
                        }]
                    }
                }] : [{
                    type: "line",
                    attrs: {
                        coordinates: [{
                            x: 0,
                            y: sn(e[0], e[1], {
                                x: 0,
                                y: e[0].y
                            })
                        }, {
                            x: t.width,
                            y: sn(e[0], e[1], {
                                x: t.width,
                                y: e[0].y
                            })
                        }]
                    }
                }] : []
            }
        }, {
            name: "verticalRayLine",
            totalStep: 3,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                var e = r.coordinates;
                if (e.length === 2) {
                    var t = {
                        x: e[0].x,
                        y: 0
                    };
                    return e[1].y > e[0].y && (t.y = r.bounding.height),
                    [{
                        type: "line",
                        attrs: {
                            coordinates: [e[0], t]
                        }
                    }]
                }
                return []
            },
            performEventPressedMove: function(r) {
                var e = r.points
                  , t = r.performPoint;
                e[0].timestamp = t.timestamp,
                e[0].dataIndex = t.dataIndex,
                e[1].timestamp = t.timestamp,
                e[1].dataIndex = t.dataIndex
            },
            performEventMoveForDrawing: function(r) {
                var e = r.points
                  , t = r.performPoint;
                r.currentStep === 2 && (e[0].timestamp = t.timestamp,
                e[0].dataIndex = t.dataIndex)
            }
        }, {
            name: "verticalSegment",
            totalStep: 3,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                var e = r.coordinates;
                return e.length === 2 ? [{
                    type: "line",
                    attrs: {
                        coordinates: e
                    }
                }] : []
            },
            performEventPressedMove: function(r) {
                var e = r.points
                  , t = r.performPoint;
                e[0].timestamp = t.timestamp,
                e[0].dataIndex = t.dataIndex,
                e[1].timestamp = t.timestamp,
                e[1].dataIndex = t.dataIndex
            },
            performEventMoveForDrawing: function(r) {
                var e = r.points
                  , t = r.performPoint;
                r.currentStep === 2 && (e[0].timestamp = t.timestamp,
                e[0].dataIndex = t.dataIndex)
            }
        }, {
            name: "verticalStraightLine",
            totalStep: 2,
            needDefaultPointFigure: !0,
            needDefaultXAxisFigure: !0,
            needDefaultYAxisFigure: !0,
            createPointFigures: function(r) {
                var e = r.coordinates;
                return [{
                    type: "line",
                    attrs: {
                        coordinates: [{
                            x: e[0].x,
                            y: 0
                        }, {
                            x: e[0].x,
                            y: r.bounding.height
                        }]
                    }
                }]
            }
        }, L1, k1].forEach(function(r) {
            _n[r.name] = Ki.extend(r)
        });
        var ei = function() {
            function r() {
                this._children = [],
                this._callbacks = new Map
            }
            return r.prototype.registerEvent = function(e, t) {
                return this._callbacks.set(e, t),
                this
            }
            ,
            r.prototype.onEvent = function(e, t, i) {
                var o = this._callbacks.get(e);
                return !(o === void 0 || !this.checkEventOn(t)) && o(t, i)
            }
            ,
            r.prototype.checkEventOn = function(e) {
                var t, i;
                try {
                    for (var o = tt(this._children), s = o.next(); !s.done; s = o.next())
                        if (s.value.checkEventOn(e))
                            return !0
                } catch (u) {
                    t = {
                        error: u
                    }
                } finally {
                    try {
                        s && !s.done && (i = o.return) && i.call(o)
                    } finally {
                        if (t)
                            throw t.error
                    }
                }
                return !1
            }
            ,
            r.prototype.dispatchEvent = function(e, t, i) {
                var o = this._children.length - 1;
                if (o > -1) {
                    for (var s = o; s > -1; s--)
                        if (this._children[s].dispatchEvent(e, t, i))
                            return !0
                }
                return this.onEvent(e, t, i)
            }
            ,
            r.prototype.addChild = function(e) {
                return this._children.push(e),
                this
            }
            ,
            r.prototype.clear = function() {
                this._children = []
            }
            ,
            r
        }()
          , je = "main"
          , ot = "xAxis"
          , rt = "yAxis"
          , ln = "separator"
          , Ji = function(r) {
            function e(t, i) {
                var o = r.call(this) || this;
                return o._bounding = $i(),
                o._pane = i,
                o._init(t),
                o
            }
            return ee(e, r),
            e.prototype._init = function(t) {
                if (this._container = R("div", this.getContainerStyle()),
                this.insertBefore()) {
                    var i = t.lastChild;
                    i !== null ? t.insertBefore(this._container, i) : t.appendChild(this._container)
                } else
                    t.appendChild(this._container);
                this.initDom(this._container)
            }
            ,
            e.prototype.setBounding = function(t) {
                return v(this._bounding, t),
                this
            }
            ,
            e.prototype.getContainer = function() {
                return this._container
            }
            ,
            e.prototype.getBounding = function() {
                return this._bounding
            }
            ,
            e.prototype.getPane = function() {
                return this._pane
            }
            ,
            e.prototype.update = function(t) {
                this.updateImp(t, this._container, this._bounding)
            }
            ,
            e.prototype.insertBefore = function() {
                return !1
            }
            ,
            e
        }(ei)
          , M1 = function(r) {
            function e(t, i) {
                var o, s, u, c = r.call(this, t, i) || this;
                return c._dragFlag = !1,
                c._dragStartY = 0,
                c._topPaneHeight = 0,
                c._currentPaneHeight = 0,
                c._pressedMouseMoveEvent = (o = c._pressedTouchMouseMoveEvent,
                s = 20,
                u = 0,
                function() {
                    var h = Date.now();
                    h - u > (s ?? 20) && (o.apply(this, arguments),
                    u = h)
                }
                ),
                c.registerEvent("touchStartEvent", c._mouseDownEvent.bind(c)).registerEvent("touchMoveEvent", c._pressedMouseMoveEvent.bind(c)).registerEvent("touchEndEvent", c._mouseUpEvent.bind(c)).registerEvent("mouseDownEvent", c._mouseDownEvent.bind(c)).registerEvent("mouseUpEvent", c._mouseUpEvent.bind(c)).registerEvent("pressedMouseMoveEvent", c._pressedMouseMoveEvent.bind(c)).registerEvent("mouseEnterEvent", c._mouseEnterEvent.bind(c)).registerEvent("mouseLeaveEvent", c._mouseLeaveEvent.bind(c)),
                c
            }
            return ee(e, r),
            e.prototype.getName = function() {
                return ln
            }
            ,
            e.prototype.checkEventOn = function() {
                return !0
            }
            ,
            e.prototype._mouseDownEvent = function(t) {
                var i, o;
                this._dragFlag = !0,
                this._dragStartY = t.pageY;
                var s = this.getPane();
                return this._topPaneHeight = (o = (i = s.getTopPane()) === null || i === void 0 ? void 0 : i.getBounding().height) !== null && o !== void 0 ? o : 0,
                this._currentPaneHeight = s.getBounding().height,
                !0
            }
            ,
            e.prototype._mouseUpEvent = function() {
                return this._dragFlag = !1,
                this._mouseLeaveEvent()
            }
            ,
            e.prototype._pressedTouchMouseMoveEvent = function(t) {
                var i = t.pageY - this._dragStartY
                  , o = this.getPane()
                  , s = o.getTopPane()
                  , u = 0 > i;
                if (s !== null && o.getOptions().dragEnabled) {
                    var c = void 0
                      , h = void 0
                      , d = void 0
                      , p = void 0;
                    u ? (c = s,
                    h = o,
                    d = this._topPaneHeight,
                    p = this._currentPaneHeight) : (c = o,
                    h = s,
                    d = this._currentPaneHeight,
                    p = this._topPaneHeight);
                    var g = c.getOptions().minHeight;
                    if (d > g) {
                        var y = Math.max(d - Math.abs(i), g)
                          , f = d - y;
                        c.setBounding({
                            height: y
                        }),
                        h.setBounding({
                            height: p + f
                        });
                        var x = o.getChart();
                        x.getChartStore().getActionStore().execute(a.ActionType.OnPaneDrag, {
                            paneId: o.getId
                        }),
                        x.adjustPaneViewport(!0, !0, !0, !0, !0)
                    }
                }
                return !0
            }
            ,
            e.prototype._mouseEnterEvent = function() {
                var t = this.getPane();
                if (t.getOptions().dragEnabled) {
                    var i = t.getChart().getStyles().separator;
                    return this._moveDom.style.background = i.activeBackgroundColor,
                    !0
                }
                return !1
            }
            ,
            e.prototype._mouseLeaveEvent = function() {
                return !this._dragFlag && (this._moveDom.style.background = "",
                !0)
            }
            ,
            e.prototype.getContainerStyle = function() {
                return {
                    margin: "0",
                    padding: "0",
                    position: "relative",
                    boxSizing: "border-box"
                }
            }
            ,
            e.prototype.insertBefore = function() {
                return !0
            }
            ,
            e.prototype.initDom = function(t) {
                this._moveDom = R("div", {
                    width: "100%",
                    height: "".concat(7, "px"),
                    margin: "0",
                    padding: "0",
                    position: "absolute",
                    top: "-3px",
                    zIndex: "20",
                    boxSizing: "border-box",
                    cursor: "ns-resize"
                }),
                t.appendChild(this._moveDom)
            }
            ,
            e.prototype.updateImp = function(t, i, o) {
                if (t === 4 || t === 2) {
                    var s = this.getPane().getChart().getStyles().separator;
                    this._moveDom.style.top = "".concat(-Math.floor((7 - s.size) / 2), "px"),
                    this._moveDom.style.height = "".concat(7, "px");
                    var u = s.fill;
                    i.style.backgroundColor = s.color,
                    i.style.height = "".concat(s.size, "px"),
                    i.style.marginLeft = "".concat(u ? 0 : o.left, "px"),
                    i.style.width = u ? "100%" : "".concat(o.width, "px")
                }
            }
            ,
            e.prototype.getImage = function() {
                var t = this.getPane().getChart().getStyles().separator
                  , i = this.getContainer().offsetWidth
                  , o = t.size
                  , s = R("canvas", {
                    width: "".concat(i, "px"),
                    height: "".concat(o, "px"),
                    boxSizing: "border-box"
                })
                  , u = s.getContext("2d")
                  , c = j(s);
                return s.width = i * c,
                s.height = o * c,
                u.scale(c, c),
                u.fillStyle = t.color,
                u.fillRect(this.getBounding().left, 0, i, o),
                s
            }
            ,
            e
        }(Ji)
          , We = "candle_pane"
          , A1 = "indcator_pane_"
          , Ze = "xaxis_pane"
          , qi = function() {
            function r(e, t, i, o, s) {
                this._yAxisWidget = null,
                this._separatorWidget = null,
                this._axis = this.createAxisComponent(),
                this._bounding = $i(),
                this._options = {
                    minHeight: 30,
                    dragEnabled: !0,
                    gap: {
                        top: .2,
                        bottom: .1
                    }
                },
                this._chart = t,
                this._id = i,
                this._topPane = o ?? null,
                this._bottomPane = s ?? null,
                this._init(e)
            }
            return r.prototype._init = function(e) {
                this._container = e,
                this._seriesContiainer = R("div", {
                    width: "100%",
                    margin: "0",
                    padding: "0",
                    position: "relative",
                    overflow: "hidden",
                    boxSizing: "border-box"
                }),
                this._separatorWidget = this.createSeparatorWidget(e);
                var t = e.lastChild;
                t !== null ? e.insertBefore(this._seriesContiainer, t) : e.appendChild(this._seriesContiainer),
                this._mainWidget = this.createMainWidget(this._seriesContiainer),
                this._yAxisWidget = this.creatYAxisWidget(this._seriesContiainer)
            }
            ,
            r.prototype.getContainer = function() {
                return this._seriesContiainer
            }
            ,
            r.prototype.getId = function() {
                return this._id
            }
            ,
            r.prototype.setOptions = function(e) {
                return v(this._options, e),
                this
            }
            ,
            r.prototype.getOptions = function() {
                return this._options
            }
            ,
            r.prototype.getChart = function() {
                return this._chart
            }
            ,
            r.prototype.getAxisComponent = function() {
                return this._axis
            }
            ,
            r.prototype.setBounding = function(e, t, i) {
                var o, s, u;
                v(this._bounding, e);
                var c = 0;
                if (this._separatorWidget !== null) {
                    c = this._chart.getStyles().separator.size;
                    var h = X(X({}, e), {
                        height: 7
                    });
                    e.top !== void 0 && (h.top = e.top - Math.floor((7 - c) / 2)),
                    this._separatorWidget.setBounding(h)
                }
                var d = {};
                return e.height !== void 0 && (d.height = e.height - c),
                e.top !== void 0 && (d.top = e.top + c),
                this._mainWidget.setBounding(d),
                (o = this._yAxisWidget) === null || o === void 0 || o.setBounding(d),
                t !== void 0 && (this._mainWidget.setBounding(t),
                (s = this._separatorWidget) === null || s === void 0 || s.setBounding(t)),
                i !== void 0 && ((u = this._yAxisWidget) === null || u === void 0 || u.setBounding(i)),
                this
            }
            ,
            r.prototype.getTopPane = function() {
                return this._topPane
            }
            ,
            r.prototype.setTopPane = function(e) {
                return this._topPane = e,
                this
            }
            ,
            r.prototype.getBottomPane = function() {
                return this._bottomPane
            }
            ,
            r.prototype.setBottomPane = function(e) {
                return this._bottomPane = e,
                this
            }
            ,
            r.prototype.getBounding = function() {
                return this._bounding
            }
            ,
            r.prototype.getMainWidget = function() {
                return this._mainWidget
            }
            ,
            r.prototype.getYAxisWidget = function() {
                return this._yAxisWidget
            }
            ,
            r.prototype.getSeparatorWidget = function() {
                return this._separatorWidget
            }
            ,
            r.prototype.update = function(e) {
                var t, i;
                this._bounding.width !== this._seriesContiainer.offsetWidth && (this._seriesContiainer.style.width = "".concat(this._bounding.width, "px"));
                var o = this._mainWidget.getBounding().height;
                o !== this._seriesContiainer.offsetHeight && (this._seriesContiainer.style.height = "".concat(o, "px"));
                var s = e ?? 3;
                this._mainWidget.update(s),
                (t = this._yAxisWidget) === null || t === void 0 || t.update(s),
                (i = this._separatorWidget) === null || i === void 0 || i.update(s)
            }
            ,
            r.prototype.getImage = function(e) {
                var t = this._bounding
                  , i = t.width
                  , o = t.height
                  , s = R("canvas", {
                    width: "".concat(i, "px"),
                    height: "".concat(o, "px"),
                    boxSizing: "border-box"
                })
                  , u = s.getContext("2d")
                  , c = j(s);
                s.width = i * c,
                s.height = o * c,
                u.scale(c, c);
                var h = 0;
                if (this._separatorWidget != null) {
                    var d = this.getChart().getStyles().separator.size;
                    h = d,
                    u.drawImage(this._separatorWidget.getImage(), 0, 0, i, d)
                }
                var p = this._mainWidget.getBounding();
                if (u.drawImage(this._mainWidget.getImage(e), p.left, h, p.width, p.height),
                this._yAxisWidget !== null) {
                    var g = this._yAxisWidget.getBounding();
                    u.drawImage(this._yAxisWidget.getImage(e), g.left, h, g.width, g.height)
                }
                return s
            }
            ,
            r.prototype.destroy = function() {
                this._container.removeChild(this._seriesContiainer),
                this._separatorWidget !== null && this._container.removeChild(this._separatorWidget.getContainer())
            }
            ,
            r.prototype.createSeparatorWidget = function(e) {
                return null
            }
            ,
            r.prototype.creatYAxisWidget = function(e) {
                return null
            }
            ,
            r
        }()
          , T1 = function() {
            function r(e) {
                this._instances = new Map,
                this._progressInstanceInfo = null,
                this._pressedInstanceInfo = {
                    paneId: "",
                    instance: null,
                    figureType: 0,
                    figureKey: "",
                    figureIndex: -1,
                    attrsIndex: -1
                },
                this._hoverInstanceInfo = {
                    paneId: "",
                    instance: null,
                    figureType: 0,
                    figureKey: "",
                    figureIndex: -1,
                    attrsIndex: -1
                },
                this._clickInstanceInfo = {
                    paneId: "",
                    instance: null,
                    figureType: 0,
                    figureKey: "",
                    figureIndex: -1,
                    attrsIndex: -1
                },
                this._chartStore = e
            }
            return r.prototype._overrideInstance = function(e, t) {
                var i = t.id
                  , o = t.groupId
                  , s = t.points
                  , u = t.styles
                  , c = t.lock
                  , h = t.visible
                  , d = t.mode
                  , p = t.extendData
                  , g = t.onDrawStart
                  , y = t.onDrawing
                  , f = t.onDrawEnd
                  , x = t.onClick
                  , _ = t.onRightClick
                  , w = t.onPressedMoveStart
                  , L = t.onPressedMoving
                  , M = t.onPressedMoveEnd
                  , k = t.onMouseEnter
                  , E = t.onMouseLeave
                  , D = t.onRemoved
                  , F = t.onSelected
                  , N = t.onDeselected
                  , O = !1;
                return i !== void 0 && e.setId(i),
                o !== void 0 && e.setGroupId(o),
                s !== void 0 && e.setPoints(s) && (O = !0),
                u !== void 0 && e.setStyles(u) && (O = !0),
                c !== void 0 && e.setLock(c),
                h !== void 0 && e.setVisible(h) && (O = !0),
                d !== void 0 && e.setMode(d),
                p !== void 0 && e.setExtendData(p) && (O = !0),
                g !== void 0 && e.setOnDrawStartCallback(g),
                y !== void 0 && e.setOnDrawingCallback(y),
                f !== void 0 && e.setOnDrawEndCallback(f),
                x !== void 0 && e.setOnClickCallback(x),
                _ !== void 0 && e.setOnRightClickCallback(_),
                w !== void 0 && e.setOnPressedMoveStartCallback(w),
                L !== void 0 && e.setOnPressedMovingCallback(L),
                M !== void 0 && e.setOnPressedMoveEndCallback(M),
                k !== void 0 && e.setOnMouseEnterCallback(k),
                E !== void 0 && e.setOnMouseLeaveCallback(E),
                D !== void 0 && e.setOnRemovedCallback(D),
                F !== void 0 && e.setOnSelectedCallback(F),
                N !== void 0 && e.setOnDeselectedCallback(N),
                O
            }
            ,
            r.prototype.getInstanceById = function(e) {
                var t, i;
                try {
                    for (var o = tt(this._instances), s = o.next(); !s.done; s = o.next()) {
                        var u = s.value[1].find(function(c) {
                            return c.id === e
                        });
                        if (u !== void 0)
                            return u
                    }
                } catch (c) {
                    t = {
                        error: c
                    }
                } finally {
                    try {
                        s && !s.done && (i = o.return) && i.call(o)
                    } finally {
                        if (t)
                            throw t.error
                    }
                }
                return this._progressInstanceInfo !== null && this._progressInstanceInfo.instance.id === e ? this._progressInstanceInfo.instance : null
            }
            ,
            r.prototype.addInstance = function(e, t, i) {
                var o, s, u, c, h = (o = e.id) !== null && o !== void 0 ? o : V("overlay_");
                if (this.getInstanceById(h) === null) {
                    var d = new (Gi(e.name))
                      , p = (s = e.groupId) !== null && s !== void 0 ? s : h;
                    return e.id = h,
                    e.groupId = p,
                    this._overrideInstance(d, e),
                    d.isDrawing() ? this._progressInstanceInfo = {
                        paneId: t,
                        instance: d,
                        appointPaneFlag: i
                    } : (this._instances.has(t) || this._instances.set(t, []),
                    (u = this._instances.get(t)) === null || u === void 0 || u.push(d)),
                    (c = d.onDrawStart) === null || c === void 0 || c.call(d, {
                        overlay: d
                    }),
                    this._chartStore.getChart().updatePane(1, t),
                    h
                }
                return null
            }
            ,
            r.prototype.getProgressInstanceInfo = function() {
                return this._progressInstanceInfo
            }
            ,
            r.prototype.progressInstanceComplete = function() {
                var e;
                if (this._progressInstanceInfo !== null) {
                    var t = this._progressInstanceInfo
                      , i = t.instance
                      , o = t.paneId;
                    i.isDrawing() || (this._instances.has(o) || this._instances.set(o, []),
                    (e = this._instances.get(o)) === null || e === void 0 || e.push(i),
                    this._progressInstanceInfo = null)
                }
            }
            ,
            r.prototype.updateProgressInstanceInfo = function(e, t) {
                this._progressInstanceInfo !== null && (t !== void 0 && t && (this._progressInstanceInfo.appointPaneFlag = t),
                this._progressInstanceInfo.paneId = e)
            }
            ,
            r.prototype.getInstances = function(e) {
                var t;
                if (e === void 0) {
                    var i = [];
                    return this._instances.forEach(function(o) {
                        i = i.concat(o)
                    }),
                    i
                }
                return (t = this._instances.get(e)) !== null && t !== void 0 ? t : []
            }
            ,
            r.prototype.override = function(e) {
                var t = this
                  , i = e.id
                  , o = e.groupId
                  , s = e.name
                  , u = !1;
                if (i !== void 0) {
                    var c = this.getInstanceById(i);
                    c !== null && this._overrideInstance(c, e) && (u = !0)
                } else if (this._instances.forEach(function(d) {
                    d.forEach(function(p) {
                        (s !== void 0 && p.name === s || o !== void 0 && p.groupId === o || s === void 0 && o === void 0) && t._overrideInstance(p, e) && (u = !0)
                    })
                }),
                this._progressInstanceInfo !== null) {
                    var h = this._progressInstanceInfo.instance;
                    (s !== void 0 && h.name === s || o !== void 0 && h.groupId === o || s === void 0 && o === void 0) && this._overrideInstance(h, e) && (u = !0)
                }
                u && this._chartStore.getChart().updatePane(1)
            }
            ,
            r.prototype.removeInstance = function(e) {
                var t, i, o, s = function(f, x) {
                    if (f.id !== void 0) {
                        if (x.id !== f.id)
                            return !1
                    } else if (f.groupId !== void 0) {
                        if (x.groupId !== f.groupId)
                            return !1
                    } else if (f.name !== void 0 && x.name !== f.name)
                        return !1;
                    return !0
                }, u = [];
                if (this._progressInstanceInfo !== null) {
                    var c = this._progressInstanceInfo.instance;
                    (e === void 0 || e !== void 0 && s(e, c)) && (u.push(this._progressInstanceInfo.paneId),
                    (o = c.onRemoved) === null || o === void 0 || o.call(c, {
                        overlay: c
                    }),
                    this._progressInstanceInfo = null)
                }
                if (e !== void 0) {
                    var h = new Map
                      , d = function(f) {
                        var x = f[1].filter(function(_) {
                            var w;
                            return !s(e, _) || (u.includes(f[0]) || u.push(f[0]),
                            (w = _.onRemoved) === null || w === void 0 || w.call(_, {
                                overlay: _
                            }),
                            !1)
                        });
                        x.length > 0 && h.set(f[0], x)
                    };
                    try {
                        for (var p = tt(this._instances), g = p.next(); !g.done; g = p.next())
                            d(g.value)
                    } catch (f) {
                        t = {
                            error: f
                        }
                    } finally {
                        try {
                            g && !g.done && (i = p.return) && i.call(p)
                        } finally {
                            if (t)
                                throw t.error
                        }
                    }
                    this._instances = h
                } else
                    this._instances.forEach(function(f, x) {
                        u.push(x),
                        f.forEach(function(_) {
                            var w;
                            (w = _.onRemoved) === null || w === void 0 || w.call(_, {
                                overlay: _
                            })
                        })
                    }),
                    this._instances.clear();
                if (u.length > 0) {
                    var y = this._chartStore.getChart();
                    u.forEach(function(f) {
                        y.updatePane(1, f)
                    }),
                    y.updatePane(1, Ze)
                }
            }
            ,
            r.prototype.setPressedInstanceInfo = function(e) {
                this._pressedInstanceInfo = e
            }
            ,
            r.prototype.getPressedInstanceInfo = function() {
                return this._pressedInstanceInfo
            }
            ,
            r.prototype.setHoverInstanceInfo = function(e, t) {
                var i, o, s, u, c, h = this._hoverInstanceInfo, d = h.instance, p = h.figureKey, g = h.figureIndex;
                (d == null ? void 0 : d.id) === ((i = e.instance) === null || i === void 0 ? void 0 : i.id) && h.figureType === e.figureType && g === e.figureIndex || (this._hoverInstanceInfo = e,
                (d == null ? void 0 : d.id) !== ((o = e.instance) === null || o === void 0 ? void 0 : o.id) && ((s = d == null ? void 0 : d.onMouseLeave) === null || s === void 0 || s.call(d, X({
                    overlay: d,
                    figureKey: p,
                    figureIndex: g
                }, t)),
                (c = (u = e.instance) === null || u === void 0 ? void 0 : u.onMouseEnter) === null || c === void 0 || c.call(u, X({
                    overlay: e.instance,
                    figureKey: e.figureKey,
                    figureIndex: e.figureIndex
                }, t))))
            }
            ,
            r.prototype.getHoverInstanceInfo = function() {
                return this._hoverInstanceInfo
            }
            ,
            r.prototype.setClickInstanceInfo = function(e, t) {
                var i, o, s, u, c, h, d, p, g, y = this._clickInstanceInfo, f = y.paneId, x = y.instance, _ = y.figureType, w = y.figureKey, L = y.figureIndex;
                if ((o = (i = e.instance) === null || i === void 0 ? void 0 : i.isDrawing()) !== null && o !== void 0 && o || (u = (s = e.instance) === null || s === void 0 ? void 0 : s.onClick) === null || u === void 0 || u.call(s, X({
                    overlay: e.instance,
                    figureKey: e.figureKey,
                    figureIndex: e.figureIndex
                }, t)),
                ((x == null ? void 0 : x.id) !== ((c = e.instance) === null || c === void 0 ? void 0 : c.id) || _ !== e.figureType || L !== e.figureIndex) && (this._clickInstanceInfo = e,
                (x == null ? void 0 : x.id) !== ((h = e.instance) === null || h === void 0 ? void 0 : h.id))) {
                    (d = x == null ? void 0 : x.onDeselected) === null || d === void 0 || d.call(x, X({
                        overlay: x,
                        figureKey: w,
                        figureIndex: L
                    }, t)),
                    (g = (p = e.instance) === null || p === void 0 ? void 0 : p.onSelected) === null || g === void 0 || g.call(p, X({
                        overlay: e.instance,
                        figureKey: e.figureKey,
                        figureIndex: e.figureIndex
                    }, t));
                    var M = this._chartStore.getChart();
                    M.updatePane(1, e.paneId),
                    f !== e.paneId && M.updatePane(1, f),
                    M.updatePane(1, Ze)
                }
            }
            ,
            r.prototype.getClickInstanceInfo = function() {
                return this._clickInstanceInfo
            }
            ,
            r.prototype.isEmpty = function() {
                return this._instances.size === 0 && this._progressInstanceInfo === null
            }
            ,
            r.prototype.isDrawing = function() {
                var e, t;
                return this._progressInstanceInfo !== null && (t = (e = this._progressInstanceInfo) === null || e === void 0 ? void 0 : e.instance.isDrawing()) !== null && t !== void 0 && t
            }
            ,
            r
        }()
          , E1 = function() {
            function r() {
                this._actions = new Map
            }
            return r.prototype.execute = function(e, t) {
                var i;
                (i = this._actions.get(e)) === null || i === void 0 || i.execute(t)
            }
            ,
            r.prototype.subscribe = function(e, t) {
                var i;
                this._actions.has(e) || this._actions.set(e, new nt),
                (i = this._actions.get(e)) === null || i === void 0 || i.subscribe(t)
            }
            ,
            r.prototype.unsubscribe = function(e, t) {
                var i = this._actions.get(e);
                i !== void 0 && (i.unsubscribe(t),
                i.isEmpty() && this._actions.delete(e))
            }
            ,
            r.prototype.has = function(e) {
                var t = this._actions.get(e);
                return t !== void 0 && !t.isEmpty()
            }
            ,
            r
        }()
          , eo = {
            light: {
                grid: {
                    horizontal: {
                        color: "#EDEDED"
                    },
                    vertical: {
                        color: "#EDEDED"
                    }
                },
                candle: {
                    priceMark: {
                        high: {
                            color: "#76808F"
                        },
                        low: {
                            color: "#76808F"
                        }
                    },
                    tooltip: {
                        rect: {
                            color: "#FEFEFE",
                            borderColor: "#F2F3F5"
                        },
                        text: {
                            color: "#76808F"
                        }
                    }
                },
                indicator: {
                    tooltip: {
                        text: {
                            color: "#76808F"
                        }
                    }
                },
                xAxis: {
                    axisLine: {
                        color: "#DDDDDD"
                    },
                    tickText: {
                        color: "#76808F"
                    },
                    tickLine: {
                        color: "#DDDDDD"
                    }
                },
                yAxis: {
                    axisLine: {
                        color: "#DDDDDD"
                    },
                    tickText: {
                        color: "#76808F"
                    },
                    tickLine: {
                        color: "#DDDDDD"
                    }
                },
                separator: {
                    color: "#DDDDDD"
                },
                crosshair: {
                    horizontal: {
                        line: {
                            color: "#76808F"
                        },
                        text: {
                            borderColor: "#686D76",
                            backgroundColor: "#686D76"
                        }
                    },
                    vertical: {
                        line: {
                            color: "#76808F"
                        },
                        text: {
                            borderColor: "#686D76",
                            backgroundColor: "#686D76"
                        }
                    }
                }
            },
            dark: {
                grid: {
                    horizontal: {
                        color: "#292929"
                    },
                    vertical: {
                        color: "#292929"
                    }
                },
                candle: {
                    priceMark: {
                        high: {
                            color: "#929AA5"
                        },
                        low: {
                            color: "#929AA5"
                        }
                    },
                    tooltip: {
                        rect: {
                            color: "rgba(10, 10, 10, .6)",
                            borderColor: "rgba(10, 10, 10, .6)"
                        },
                        text: {
                            color: "#929AA5"
                        }
                    }
                },
                indicator: {
                    tooltip: {
                        text: {
                            color: "#929AA5"
                        }
                    }
                },
                xAxis: {
                    axisLine: {
                        color: "#333333"
                    },
                    tickText: {
                        color: "#929AA5"
                    },
                    tickLine: {
                        color: "#333333"
                    }
                },
                yAxis: {
                    axisLine: {
                        color: "#333333"
                    },
                    tickText: {
                        color: "#929AA5"
                    },
                    tickLine: {
                        color: "#333333"
                    }
                },
                separator: {
                    color: "#333333"
                },
                crosshair: {
                    horizontal: {
                        line: {
                            color: "#929AA5"
                        },
                        text: {
                            borderColor: "#373a40",
                            backgroundColor: "#373a40"
                        }
                    },
                    vertical: {
                        line: {
                            color: "#929AA5"
                        },
                        text: {
                            borderColor: "#373a40",
                            backgroundColor: "#373a40"
                        }
                    }
                }
            }
        };
        function to(r) {
            var e;
            return (e = eo[r]) !== null && e !== void 0 ? e : null
        }
        var I1 = function() {
            function r(e, t) {
                this._styles = {
                    grid: {
                        show: !0,
                        horizontal: {
                            show: !0,
                            size: 1,
                            color: "#EDEDED",
                            style: a.LineType.Dashed,
                            dashedValue: [2, 2]
                        },
                        vertical: {
                            show: !0,
                            size: 1,
                            color: "#EDEDED",
                            style: a.LineType.Dashed,
                            dashedValue: [2, 2]
                        }
                    },
                    candle: {
                        type: a.CandleType.CandleSolid,
                        bar: {
                            upColor: "#2DC08E",
                            downColor: "#F92855",
                            noChangeColor: "#888888",
                            upBorderColor: "#2DC08E",
                            downBorderColor: "#F92855",
                            noChangeBorderColor: "#888888",
                            upWickColor: "#2DC08E",
                            downWickColor: "#F92855",
                            noChangeWickColor: "#888888"
                        },
                        area: {
                            lineSize: 2,
                            lineColor: "#1677FF",
                            value: "close",
                            backgroundColor: [{
                                offset: 0,
                                color: "rgba(22, 119, 255, 0.01)"
                            }, {
                                offset: 1,
                                color: "rgba(22, 119, 255, 0.2)"
                            }]
                        },
                        priceMark: {
                            show: !0,
                            high: {
                                show: !0,
                                color: "#76808F",
                                textOffset: 5,
                                textSize: 10,
                                textFamily: "Helvetica Neue",
                                textWeight: "normal"
                            },
                            low: {
                                show: !0,
                                color: "#76808F",
                                textOffset: 5,
                                textSize: 10,
                                textFamily: "Helvetica Neue",
                                textWeight: "normal"
                            },
                            last: {
                                show: !0,
                                upColor: "#2DC08E",
                                downColor: "#F92855",
                                noChangeColor: "#888888",
                                line: {
                                    show: !0,
                                    style: a.LineType.Dashed,
                                    dashedValue: [4, 4],
                                    size: 1
                                },
                                text: {
                                    show: !0,
                                    style: a.PolygonType.Fill,
                                    size: 12,
                                    paddingLeft: 4,
                                    paddingTop: 4,
                                    paddingRight: 4,
                                    paddingBottom: 4,
                                    borderStyle: a.LineType.Solid,
                                    borderSize: 1,
                                    borderDashedValue: [2, 2],
                                    color: "#FFFFFF",
                                    family: "Helvetica Neue",
                                    weight: "normal",
                                    borderRadius: 2
                                }
                            }
                        },
                        tooltip: {
                            showRule: a.TooltipShowRule.Always,
                            showType: a.TooltipShowType.Standard,
                            custom: null,
                            defaultValue: "n/a",
                            rect: {
                                position: le.Fixed,
                                paddingLeft: 0,
                                paddingRight: 0,
                                paddingTop: 0,
                                paddingBottom: 8,
                                offsetLeft: 10,
                                offsetTop: 8,
                                offsetRight: 10,
                                offsetBottom: 8,
                                borderRadius: 4,
                                borderSize: 1,
                                borderColor: "#F2F3F5",
                                color: "#FEFEFE"
                            },
                            text: {
                                size: 12,
                                family: "Helvetica Neue",
                                weight: "normal",
                                color: "#76808F",
                                marginLeft: 10,
                                marginTop: 8,
                                marginRight: 6,
                                marginBottom: 0
                            },
                            icons: []
                        }
                    },
                    indicator: {
                        ohlc: {
                            upColor: "rgba(45, 192, 142, .7)",
                            downColor: "rgba(249, 40, 85, .7)",
                            noChangeColor: "#888888"
                        },
                        bars: [{
                            style: a.PolygonType.Fill,
                            borderStyle: a.LineType.Solid,
                            borderSize: 1,
                            borderDashedValue: [2, 2],
                            upColor: "rgba(45, 192, 142, .7)",
                            downColor: "rgba(249, 40, 85, .7)",
                            noChangeColor: "#888888"
                        }],
                        lines: [{
                            style: a.LineType.Solid,
                            smooth: !1,
                            size: 1,
                            dashedValue: [2, 2],
                            color: "#FF9600"
                        }, {
                            style: a.LineType.Solid,
                            smooth: !1,
                            size: 1,
                            dashedValue: [2, 2],
                            color: "#935EBD"
                        }, {
                            style: a.LineType.Solid,
                            smooth: !1,
                            size: 1,
                            dashedValue: [2, 2],
                            color: "#1677FF"
                        }, {
                            style: a.LineType.Solid,
                            smooth: !1,
                            size: 1,
                            dashedValue: [2, 2],
                            color: "#E11D74"
                        }, {
                            style: a.LineType.Solid,
                            smooth: !1,
                            size: 1,
                            dashedValue: [2, 2],
                            color: "#01C5C4"
                        }],
                        circles: [{
                            style: a.PolygonType.Fill,
                            borderStyle: a.LineType.Solid,
                            borderSize: 1,
                            borderDashedValue: [2, 2],
                            upColor: "rgba(45, 192, 142, .7)",
                            downColor: "rgba(249, 40, 85, .7)",
                            noChangeColor: "#888888"
                        }],
                        lastValueMark: {
                            show: !1,
                            text: {
                                show: !1,
                                style: a.PolygonType.Fill,
                                color: "#FFFFFF",
                                size: 12,
                                family: "Helvetica Neue",
                                weight: "normal",
                                borderStyle: a.LineType.Solid,
                                borderSize: 1,
                                borderDashedValue: [2, 2],
                                paddingLeft: 4,
                                paddingTop: 4,
                                paddingRight: 4,
                                paddingBottom: 4,
                                borderRadius: 2
                            }
                        },
                        tooltip: {
                            showRule: a.TooltipShowRule.Always,
                            showType: a.TooltipShowType.Standard,
                            showName: !0,
                            showParams: !0,
                            defaultValue: "n/a",
                            text: {
                                size: 12,
                                family: "Helvetica Neue",
                                weight: "normal",
                                color: "#76808F",
                                marginLeft: 10,
                                marginTop: 8,
                                marginRight: 6,
                                marginBottom: 0
                            },
                            icons: []
                        }
                    },
                    xAxis: {
                        show: !0,
                        size: "auto",
                        axisLine: {
                            show: !0,
                            color: "#DDDDDD",
                            size: 1
                        },
                        tickText: {
                            show: !0,
                            color: "#76808F",
                            size: 12,
                            family: "Helvetica Neue",
                            weight: "normal",
                            marginStart: 4,
                            marginEnd: 4
                        },
                        tickLine: {
                            show: !0,
                            size: 1,
                            length: 3,
                            color: "#DDDDDD"
                        }
                    },
                    yAxis: {
                        show: !0,
                        size: "auto",
                        type: a.YAxisType.Normal,
                        position: a.YAxisPosition.Right,
                        inside: !1,
                        reverse: !1,
                        axisLine: {
                            show: !0,
                            color: "#DDDDDD",
                            size: 1
                        },
                        tickText: {
                            show: !0,
                            color: "#76808F",
                            size: 12,
                            family: "Helvetica Neue",
                            weight: "normal",
                            marginStart: 4,
                            marginEnd: 4
                        },
                        tickLine: {
                            show: !0,
                            size: 1,
                            length: 3,
                            color: "#DDDDDD"
                        }
                    },
                    separator: {
                        size: 1,
                        color: "#DDDDDD",
                        fill: !0,
                        activeBackgroundColor: "rgba(33, 150, 243, 0.08)"
                    },
                    crosshair: {
                        show: !0,
                        horizontal: {
                            show: !0,
                            line: {
                                show: !0,
                                style: a.LineType.Dashed,
                                dashedValue: [4, 2],
                                size: 1,
                                color: "#76808F"
                            },
                            text: {
                                show: !0,
                                style: a.PolygonType.Fill,
                                color: "#FFFFFF",
                                size: 12,
                                family: "Helvetica Neue",
                                weight: "normal",
                                borderStyle: a.LineType.Solid,
                                borderDashedValue: [2, 2],
                                borderSize: 1,
                                borderColor: "#686D76",
                                borderRadius: 2,
                                paddingLeft: 4,
                                paddingRight: 4,
                                paddingTop: 4,
                                paddingBottom: 4,
                                backgroundColor: "#686D76"
                            }
                        },
                        vertical: {
                            show: !0,
                            line: {
                                show: !0,
                                style: a.LineType.Dashed,
                                dashedValue: [4, 2],
                                size: 1,
                                color: "#76808F"
                            },
                            text: {
                                show: !0,
                                style: a.PolygonType.Fill,
                                color: "#FFFFFF",
                                size: 12,
                                family: "Helvetica Neue",
                                weight: "normal",
                                borderStyle: a.LineType.Solid,
                                borderDashedValue: [2, 2],
                                borderSize: 1,
                                borderRadius: 2,
                                borderColor: "#686D76",
                                paddingLeft: 4,
                                paddingRight: 4,
                                paddingTop: 4,
                                paddingBottom: 4,
                                backgroundColor: "#686D76"
                            }
                        }
                    },
                    overlay: {
                        point: {
                            color: "#1677FF",
                            borderColor: "rgba(22, 119, 255, 0.35)",
                            borderSize: 1,
                            radius: 5,
                            activeColor: "#1677FF",
                            activeBorderColor: "rgba(22, 119, 255, 0.35)",
                            activeBorderSize: 3,
                            activeRadius: 5
                        },
                        line: {
                            style: a.LineType.Solid,
                            smooth: !1,
                            color: "#1677FF",
                            size: 1,
                            dashedValue: [2, 2]
                        },
                        rect: {
                            style: a.PolygonType.Fill,
                            color: "rgba(22, 119, 255, 0.25)",
                            borderColor: "#1677FF",
                            borderSize: 1,
                            borderRadius: 0,
                            borderStyle: a.LineType.Solid,
                            borderDashedValue: [2, 2]
                        },
                        polygon: {
                            style: a.PolygonType.Fill,
                            color: "#1677FF",
                            borderColor: "#1677FF",
                            borderSize: 1,
                            borderStyle: a.LineType.Solid,
                            borderDashedValue: [2, 2]
                        },
                        circle: {
                            style: a.PolygonType.Fill,
                            color: "rgba(22, 119, 255, 0.25)",
                            borderColor: "#1677FF",
                            borderSize: 1,
                            borderStyle: a.LineType.Solid,
                            borderDashedValue: [2, 2]
                        },
                        arc: {
                            style: a.LineType.Solid,
                            color: "#1677FF",
                            size: 1,
                            dashedValue: [2, 2]
                        },
                        text: {
                            color: "#1677FF",
                            size: 12,
                            family: "Helvetica Neue",
                            weight: "normal"
                        },
                        rectText: {
                            style: a.PolygonType.Fill,
                            color: "#FFFFFF",
                            size: 12,
                            family: "Helvetica Neue",
                            weight: "normal",
                            borderStyle: a.LineType.Solid,
                            borderDashedValue: [2, 2],
                            borderSize: 1,
                            borderRadius: 2,
                            borderColor: "#1677FF",
                            paddingLeft: 4,
                            paddingRight: 4,
                            paddingTop: 4,
                            paddingBottom: 4,
                            backgroundColor: "#1677FF"
                        }
                    }
                },
                this._customApi = {
                    formatDate: ae,
                    formatBigNumber: fe
                },
                this._locale = "en-US",
                this._precision = {
                    price: 2,
                    volume: 0
                },
                this._thousandsSeparator = ",",
                this._dataList = [],
                this._timeScaleStore = new h1(this),
                this._indicatorStore = new C1(this),
                this._overlayStore = new T1(this),
                this._crosshairStore = new x1(this),
                this._tooltipStore = new _1,
                this._actionStore = new E1,
                this._visibleDataList = [],
                this._chart = e,
                this.setOptions(t)
            }
            return r.prototype.adjustVisibleDataList = function() {
                this._visibleDataList = [];
                for (var e = this._timeScaleStore.getVisibleRange(), t = e.to, i = e.from; t > i; i++) {
                    var o = this._dataList[i]
                      , s = this._timeScaleStore.dataIndexToCoordinate(i);
                    this._visibleDataList.push({
                        dataIndex: i,
                        x: s,
                        data: o
                    })
                }
            }
            ,
            r.prototype.setOptions = function(e) {
                if (e !== void 0) {
                    var t = e.locale
                      , i = e.timezone
                      , o = e.styles
                      , s = e.customApi;
                    t !== void 0 && (this._locale = t),
                    i !== void 0 && this._timeScaleStore.setTimezone(i),
                    o !== void 0 && (B(o) ? v(this._styles, to(o)) : v(this._styles, o)),
                    s !== void 0 && v(this._customApi, s),
                    e.thousandsSeparator !== void 0 && (this._thousandsSeparator = e.thousandsSeparator)
                }
                return this
            }
            ,
            r.prototype.getStyles = function() {
                return this._styles
            }
            ,
            r.prototype.getLocale = function() {
                return this._locale
            }
            ,
            r.prototype.getCustomApi = function() {
                return this._customApi
            }
            ,
            r.prototype.getThousandsSeparator = function() {
                return this._thousandsSeparator
            }
            ,
            r.prototype.getPrecision = function() {
                return this._precision
            }
            ,
            r.prototype.setPrecision = function(e) {
                return this._precision = e,
                this._indicatorStore.setSeriesPrecision(e),
                this
            }
            ,
            r.prototype.getDataList = function() {
                return this._dataList
            }
            ,
            r.prototype.getVisibleDataList = function() {
                return this._visibleDataList
            }
            ,
            r.prototype.addData = function(e, t, i) {
                if (C(e)) {
                    this._timeScaleStore.setLoading(!1),
                    this._timeScaleStore.setMore(i == null || i);
                    var o = this._dataList.length === 0;
                    this._dataList = e.concat(this._dataList),
                    o && this._timeScaleStore.resetOffsetRightDistance(),
                    this._timeScaleStore.adjustVisibleRange()
                } else if (t < this._dataList.length)
                    this._dataList[t] = e,
                    this.adjustVisibleDataList();
                else {
                    this._dataList.push(e);
                    var s = this._timeScaleStore.getOffsetRightBarCount();
                    0 > s && this._timeScaleStore.setOffsetRightBarCount(--s),
                    this._timeScaleStore.adjustVisibleRange()
                }
                this._crosshairStore.recalculate(!0)
            }
            ,
            r.prototype.clearDataList = function() {
                this._dataList = [],
                this._visibleDataList = [],
                this._timeScaleStore.clear()
            }
            ,
            r.prototype.getTimeScaleStore = function() {
                return this._timeScaleStore
            }
            ,
            r.prototype.getIndicatorStore = function() {
                return this._indicatorStore
            }
            ,
            r.prototype.getOverlayStore = function() {
                return this._overlayStore
            }
            ,
            r.prototype.getCrosshairStore = function() {
                return this._crosshairStore
            }
            ,
            r.prototype.getTooltipStore = function() {
                return this._tooltipStore
            }
            ,
            r.prototype.getActionStore = function() {
                return this._actionStore
            }
            ,
            r.prototype.getChart = function() {
                return this._chart
            }
            ,
            r
        }();
        function ti(r) {
            return window.requestAnimationFrame == null ? window.setTimeout(r, 20) : window.requestAnimationFrame(r)
        }
        function ni(r) {
            window.cancelAnimationFrame == null && window.clearTimeout(r),
            window.cancelAnimationFrame(r)
        }
        var Yt = -1
          , ii = function(r) {
            function e() {
                var t = r !== null && r.apply(this, arguments) || this;
                return t._mainRequestAnimationId = Yt,
                t._overlayRequestAnimationId = Yt,
                t
            }
            return ee(e, r),
            e.prototype.getContainerStyle = function() {
                return {
                    margin: "0",
                    padding: "0",
                    position: "absolute",
                    top: "0",
                    overflow: "hidden",
                    boxSizing: "border-box"
                }
            }
            ,
            e.prototype.initDom = function(t) {
                this._mainCanvas = R("canvas", {
                    position: "absolute",
                    top: "0",
                    left: "0",
                    zIndex: "2",
                    boxSizing: "border-box"
                }),
                this._mainCtx = this._mainCanvas.getContext("2d"),
                this._overlayCanvas = R("canvas", {
                    position: "absolute",
                    top: "0",
                    left: "0",
                    zIndex: "2",
                    boxSizing: "border-box"
                }),
                this._overlayCtx = this._overlayCanvas.getContext("2d"),
                t.appendChild(this._mainCanvas),
                t.appendChild(this._overlayCanvas)
            }
            ,
            e.prototype._optimalUpdateMain = function(t, i) {
                var o = this;
                this._mainRequestAnimationId !== Yt && (ni(this._mainRequestAnimationId),
                this._mainRequestAnimationId = Yt),
                this._mainRequestAnimationId = ti(function() {
                    if (t !== o._mainCanvas.offsetWidth || i !== o._mainCanvas.offsetHeight) {
                        o._mainCtx.clearRect(0, 0, o._mainCanvas.offsetWidth, o._mainCanvas.offsetHeight);
                        var s = j(o._mainCanvas)
                          , u = Math.floor(t * s)
                          , c = Math.floor(i * s);
                        o._mainCanvas.style.width = "".concat(t, "px"),
                        o._mainCanvas.style.height = "".concat(i, "px"),
                        o._mainCanvas.width = u,
                        o._mainCanvas.height = c,
                        o._mainCtx.scale(s, s)
                    } else
                        o._mainCtx.clearRect(0, 0, o._mainCanvas.offsetWidth, o._mainCanvas.offsetHeight);
                    o.updateMain(o._mainCtx)
                })
            }
            ,
            e.prototype._optimalUpdateOverlay = function(t, i) {
                var o = this;
                this._overlayRequestAnimationId !== Yt && (ni(this._overlayRequestAnimationId),
                this._overlayRequestAnimationId = Yt),
                this._overlayRequestAnimationId = ti(function() {
                    if (t !== o._overlayCanvas.offsetWidth || i !== o._overlayCanvas.offsetHeight) {
                        o._overlayCtx.clearRect(0, 0, o._overlayCanvas.offsetWidth, o._overlayCanvas.offsetHeight);
                        var s = j(o._overlayCanvas)
                          , u = Math.floor(t * s)
                          , c = Math.floor(i * s);
                        o._overlayCanvas.style.width = "".concat(t, "px"),
                        o._overlayCanvas.style.height = "".concat(i, "px"),
                        o._overlayCanvas.width = u,
                        o._overlayCanvas.height = c,
                        o._overlayCtx.scale(s, s)
                    } else
                        o._overlayCtx.clearRect(0, 0, o._overlayCanvas.offsetWidth, o._overlayCanvas.offsetHeight);
                    o.updateOverlay(o._overlayCtx)
                })
            }
            ,
            e.prototype.updateImp = function(t, i, o) {
                var s = o.width
                  , u = o.height;
                i.style.left = "".concat(o.left, "px");
                var c = t;
                switch (s === i.offsetWidth && u === i.offsetHeight || (i.style.width = "".concat(s, "px"),
                i.style.height = "".concat(u, "px"),
                c = 3),
                c) {
                case 0:
                    this._optimalUpdateMain(s, u);
                    break;
                case 1:
                    this._optimalUpdateOverlay(s, u);
                    break;
                case 3:
                case 4:
                    this._optimalUpdateMain(s, u),
                    this._optimalUpdateOverlay(s, u)
                }
            }
            ,
            e.prototype.getImage = function(t) {
                var i = this.getBounding()
                  , o = i.width
                  , s = i.height
                  , u = R("canvas", {
                    width: "".concat(o, "px"),
                    height: "".concat(s, "px"),
                    boxSizing: "border-box"
                })
                  , c = u.getContext("2d")
                  , h = j(u);
                return u.width = o * h,
                u.height = s * h,
                c.scale(h, h),
                c.drawImage(this._mainCanvas, 0, 0, o, s),
                t && c.drawImage(this._overlayCanvas, 0, 0, o, s),
                u
            }
            ,
            e
        }(Ji)
          , no = function(r) {
            function e(t) {
                var i = r.call(this) || this;
                return i.attrs = t.attrs,
                i.styles = t.styles,
                i
            }
            return ee(e, r),
            e.prototype.checkEventOn = function(t) {
                return this.checkEventOnImp(t, this.attrs, this.styles)
            }
            ,
            e.prototype.draw = function(t) {
                this.drawImp(t, this.attrs, this.styles)
            }
            ,
            e.extend = function(t) {
                var i = function(o) {
                    function s() {
                        return o !== null && o.apply(this, arguments) || this
                    }
                    return ee(s, o),
                    s.prototype.checkEventOnImp = function(u, c, h) {
                        return t.checkEventOn(u, c, h)
                    }
                    ,
                    s.prototype.drawImp = function(u, c, h) {
                        t.draw(u, c, h)
                    }
                    ,
                    s
                }(e);
                return i
            }
            ,
            e
        }(ei);
        function io(r, e) {
            var t = r.x - e.x
              , i = r.y - e.y
              , o = e.r;
            return !(t * t + i * i > o * o)
        }
        function oo(r, e, t) {
            var i = e.x
              , o = e.y
              , s = e.r
              , u = t.style
              , c = u === void 0 ? a.PolygonType.Fill : u
              , h = t.color
              , d = t.borderSize
              , p = d === void 0 ? 1 : d
              , g = t.borderColor
              , y = g === void 0 ? "currentColor" : g
              , f = t.borderStyle
              , x = f === void 0 ? a.LineType.Solid : f
              , _ = t.borderDashedValue
              , w = _ === void 0 ? [2, 2] : _;
            c !== a.PolygonType.Fill && t.style !== a.PolygonType.StrokeFill || (r.fillStyle = h === void 0 ? "currentColor" : h,
            r.beginPath(),
            r.arc(i, o, s, 0, 2 * Math.PI),
            r.closePath(),
            r.fill()),
            c !== a.PolygonType.Stroke && t.style !== a.PolygonType.StrokeFill || (r.strokeStyle = y,
            r.lineWidth = p,
            r.setLineDash(x === a.LineType.Dashed ? w : []),
            r.beginPath(),
            r.arc(i, o, s, 0, 2 * Math.PI),
            r.closePath(),
            r.stroke())
        }
        var D1 = {
            name: "circle",
            checkEventOn: io,
            draw: function(r, e, t) {
                oo(r, e, t)
            }
        };
        function ro(r, e) {
            for (var t = !1, i = e.coordinates, o = 0, s = i.length - 1; i.length > o; s = o++)
                i[o].y > r.y != i[s].y > r.y && (i[s].x - i[o].x) * (r.y - i[o].y) / (i[s].y - i[o].y) + i[o].x > r.x && (t = !t);
            return t
        }
        function ao(r, e, t) {
            var i = e.coordinates
              , o = t.style
              , s = o === void 0 ? a.PolygonType.Fill : o
              , u = t.color
              , c = t.borderSize
              , h = c === void 0 ? 1 : c
              , d = t.borderColor
              , p = d === void 0 ? "currentColor" : d
              , g = t.borderStyle
              , y = g === void 0 ? a.LineType.Solid : g
              , f = t.borderDashedValue
              , x = f === void 0 ? [2, 2] : f;
            if (s === a.PolygonType.Fill || t.style === a.PolygonType.StrokeFill) {
                r.fillStyle = u === void 0 ? "currentColor" : u,
                r.beginPath(),
                r.moveTo(i[0].x, i[0].y);
                for (var _ = 1; i.length > _; _++)
                    r.lineTo(i[_].x, i[_].y);
                r.closePath(),
                r.fill()
            }
            if (s === a.PolygonType.Stroke || t.style === a.PolygonType.StrokeFill) {
                for (r.strokeStyle = p,
                r.lineWidth = h,
                r.setLineDash(y === a.LineType.Dashed ? x : []),
                r.beginPath(),
                r.moveTo(i[0].x, i[0].y),
                _ = 1; i.length > _; _++)
                    r.lineTo(i[_].x, i[_].y);
                r.closePath(),
                r.stroke()
            }
        }
        var P1 = {
            name: "polygon",
            checkEventOn: ro,
            draw: function(r, e, t) {
                ao(r, e, t)
            }
        };
        function so(r, e) {
            return !(e.x > r.x || r.x > e.x + e.width || e.y > r.y || r.y > e.y + e.height)
        }
        function oi(r, e, t) {
            var i = e.x
              , o = e.y
              , s = e.width
              , u = e.height
              , c = t.style
              , h = c === void 0 ? a.PolygonType.Fill : c
              , d = t.color
              , p = t.borderSize
              , g = p === void 0 ? 1 : p
              , y = t.borderColor
              , f = y === void 0 ? "currentColor" : y
              , x = t.borderStyle
              , _ = x === void 0 ? a.LineType.Solid : x
              , w = t.borderRadius
              , L = w === void 0 ? 0 : w
              , M = t.borderDashedValue
              , k = M === void 0 ? [2, 2] : M;
            h !== a.PolygonType.Fill && t.style !== a.PolygonType.StrokeFill || (r.fillStyle = d === void 0 ? "currentColor" : d,
            r.beginPath(),
            r.moveTo(i + L, o),
            r.arcTo(i + s, o, i + s, o + u, L),
            r.arcTo(i + s, o + u, i, o + u, L),
            r.arcTo(i, o + u, i, o, L),
            r.arcTo(i, o, i + s, o, L),
            r.closePath(),
            r.fill()),
            h !== a.PolygonType.Stroke && t.style !== a.PolygonType.StrokeFill || (r.strokeStyle = f,
            r.lineWidth = g,
            r.setLineDash(_ === a.LineType.Dashed ? k : []),
            r.beginPath(),
            r.moveTo(i + L, o),
            r.arcTo(i + s, o, i + s, o + u, L),
            r.arcTo(i + s, o + u, i, o + u, L),
            r.arcTo(i, o + u, i, o, L),
            r.arcTo(i, o, i + s, o, L),
            r.closePath(),
            r.stroke())
        }
        var F1 = {
            name: "rect",
            checkEventOn: so,
            draw: function(r, e, t) {
                oi(r, e, t)
            }
        };
        function lo(r, e, t) {
            var i = e.size
              , o = i === void 0 ? 12 : i
              , s = e.paddingLeft
              , u = s === void 0 ? 0 : s
              , c = e.paddingTop
              , h = c === void 0 ? 0 : c
              , d = e.paddingRight
              , p = d === void 0 ? 0 : d
              , g = e.paddingBottom
              , y = g === void 0 ? 0 : g
              , f = r.x
              , x = r.y
              , _ = r.align
              , w = r.baseline
              , L = w === void 0 ? "top" : w;
            t = t ?? o * r.text.length;
            var M, k, E = o;
            switch (_ === void 0 ? "left" : _) {
            case "left":
            case "start":
                M = f;
                break;
            case "right":
            case "end":
                M = f - p - t - u;
                break;
            default:
                M = f - t / 2 - u
            }
            switch (L) {
            case "top":
            case "hanging":
                k = x;
                break;
            case "bottom":
            case "ideographic":
            case "alphabetic":
                k = x - E - h - y;
                break;
            default:
                k = x - E / 2 - h
            }
            return {
                x: M,
                y: k,
                width: u + t + p,
                height: h + E + y
            }
        }
        function ri(r, e, t) {
            var i = lo(e, t)
              , o = i.x
              , s = i.y;
            return !(o > r.x || r.x > o + i.width || s > r.y || r.y > s + i.height)
        }
        function ai(r, e, t) {
            var i = e.x
              , o = e.y
              , s = e.text
              , u = e.align
              , c = e.baseline
              , h = c === void 0 ? "top" : c
              , d = t.color
              , p = d === void 0 ? "currentColor" : d
              , g = t.size
              , y = g === void 0 ? 12 : g
              , f = t.family
              , x = t.weight;
            r.textAlign = u === void 0 ? "left" : u,
            r.textBaseline = h,
            r.font = Q(y, x, f),
            r.fillStyle = p,
            r.fillText(s, i, o)
        }
        var B1 = {
            name: "text",
            checkEventOn: function(r, e, t) {
                return ri(r, e, t)
            },
            draw: function(r, e, t) {
                ai(r, e, t)
            }
        };
        function co(r, e, t) {
            var i = e.text
              , o = t.size
              , s = t.paddingLeft
              , u = s === void 0 ? 0 : s
              , c = t.paddingTop
              , h = c === void 0 ? 0 : c;
            r.font = Q(o === void 0 ? 12 : o, t.weight, t.family);
            var d = lo(e, t, r.measureText(i).width);
            oi(r, d, X(X({}, t), {
                color: t.backgroundColor
            })),
            ai(r, {
                x: d.x + u,
                y: d.y + h,
                text: i,
                align: "left",
                baseline: "top"
            }, t)
        }
        var N1 = {
            name: "rectText",
            checkEventOn: function(r, e, t) {
                return ri(r, e, t)
            },
            draw: function(r, e, t) {
                co(r, e, t)
            }
        };
        function uo(r, e) {
            if (2 > Math.abs(Math.sqrt((g = (d = r).x - (p = e).x) * g + (y = d.y - p.y) * y) - e.r)) {
                var t = e.r
                  , i = e.startAngle
                  , o = e.endAngle
                  , s = t * Math.cos(i) + e.x
                  , u = t * Math.sin(i) + e.y
                  , c = t * Math.cos(o) + e.x
                  , h = t * Math.sin(o) + e.y;
                return !(r.x > Math.max(s, c) + 2 || Math.min(s, c) - 2 > r.x || r.y > Math.max(u, h) + 2 || Math.min(u, h) - 2 > r.y)
            }
            var d, p, g, y;
            return !1
        }
        function ho(r, e, t) {
            var i = e.x
              , o = e.y
              , s = e.r
              , u = e.startAngle
              , c = e.endAngle
              , h = t.style
              , d = h === void 0 ? a.LineType.Solid : h
              , p = t.size
              , g = t.color
              , y = g === void 0 ? "currentColor" : g
              , f = t.dashedValue
              , x = f === void 0 ? [2, 2] : f;
            r.lineWidth = p === void 0 ? 1 : p,
            r.strokeStyle = y,
            r.setLineDash(d === a.LineType.Dashed ? x : []),
            r.beginPath(),
            r.arc(i, o, s, u, c),
            r.stroke(),
            r.closePath()
        }
        var R1 = {
            name: "arc",
            checkEventOn: uo,
            draw: function(r, e, t) {
                ho(r, e, t)
            }
        }
          , cn = {};
        [D1, w1, P1, F1, B1, N1, R1].forEach(function(r) {
            cn[r.name] = no.extend(r)
        });
        var at = function(r) {
            function e(t) {
                var i = r.call(this) || this;
                return i._widget = t,
                i
            }
            return ee(e, r),
            e.prototype.getWidget = function() {
                return this._widget
            }
            ,
            e.prototype.createFigure = function(t, i, o, s) {
                var u = function(d) {
                    var p;
                    return (p = cn[d]) !== null && p !== void 0 ? p : null
                }(t);
                if (u !== null) {
                    var c = new u({
                        name: t,
                        attrs: i,
                        styles: o
                    });
                    if (s !== void 0) {
                        for (var h in s)
                            s.hasOwnProperty(h) && c.registerEvent(h, s[h]);
                        this.addChild(c)
                    }
                    return c
                }
                return null
            }
            ,
            e.prototype.draw = function(t) {
                this.clear(),
                this.drawImp(t)
            }
            ,
            e
        }(ei)
          , O1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.drawImp = function(t) {
                var i, o = this, s = this.getWidget(), u = this.getWidget().getPane(), c = u.getChart(), h = s.getBounding(), d = c.getStyles().grid;
                if (d.show) {
                    t.save(),
                    t.globalCompositeOperation = "destination-over";
                    var p = d.horizontal;
                    p.show && u.getAxisComponent().getTicks().forEach(function(y) {
                        var f;
                        (f = o.createFigure("line", {
                            coordinates: [{
                                x: 0,
                                y: y.coord
                            }, {
                                x: h.width,
                                y: y.coord
                            }]
                        }, p)) === null || f === void 0 || f.draw(t)
                    });
                    var g = d.vertical;
                    g.show && ((i = c.getPaneById(Ze)) === null || i === void 0 ? void 0 : i.getAxisComponent()).getTicks().forEach(function(y) {
                        var f;
                        (f = o.createFigure("line", {
                            coordinates: [{
                                x: y.coord,
                                y: 0
                            }, {
                                x: y.coord,
                                y: h.height
                            }]
                        }, g)) === null || f === void 0 || f.draw(t)
                    }),
                    t.restore()
                }
            }
            ,
            e
        }(at)
          , si = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.eachChildren = function(t) {
                var i = this.getWidget().getPane().getChart().getChartStore()
                  , o = i.getVisibleDataList()
                  , s = i.getTimeScaleStore().getBarSpace();
                o.forEach(function(u, c) {
                    t(u, s, c)
                })
            }
            ,
            e
        }(at)
          , po = function(r) {
            function e() {
                var t = r !== null && r.apply(this, arguments) || this;
                return t._boundCandleBarClickEvent = function(i) {
                    return function() {
                        return t.getWidget().getPane().getChart().getChartStore().getActionStore().execute(a.ActionType.OnCandleBarClick, i),
                        !1
                    }
                }
                ,
                t
            }
            return ee(e, r),
            e.prototype.drawImp = function(t) {
                var i = this
                  , o = this.getWidget().getPane()
                  , s = o.getId() === We
                  , u = o.getChart().getChartStore()
                  , c = this.getCandleBarOptions(u);
                if (c !== null) {
                    var h = o.getAxisComponent();
                    this.eachChildren(function(d, p) {
                        i._drawCandleBar(t, h, d, p, c, s)
                    })
                }
            }
            ,
            e.prototype.getCandleBarOptions = function(t) {
                var i = t.getStyles().candle;
                return {
                    type: i.type,
                    styles: i.bar
                }
            }
            ,
            e.prototype._drawCandleBar = function(t, i, o, s, u, c) {
                var h, d, p, g = this, y = o.data, f = o.x, x = y.open, _ = y.high, w = y.low, L = y.close, M = s.halfGapBar, k = s.gapBar, E = u.type, D = u.styles;
                L > x ? (h = D.upColor,
                d = D.upBorderColor,
                p = D.upWickColor) : x > L ? (h = D.downColor,
                d = D.downBorderColor,
                p = D.downWickColor) : (h = D.noChangeColor,
                d = D.noChangeBorderColor,
                p = D.noChangeWickColor);
                var F = i.convertToPixel(x)
                  , N = i.convertToPixel(L)
                  , O = [F, N, i.convertToPixel(_), i.convertToPixel(w)];
                O.sort(function($, se) {
                    return $ - se
                });
                var z = Math.max(1, O[2] - O[1])
                  , U = [];
                E !== a.CandleType.Ohlc ? (U.push({
                    name: "rect",
                    attrs: {
                        x: f - .5,
                        y: O[0],
                        width: 1,
                        height: O[1] - O[0]
                    },
                    styles: {
                        color: p
                    }
                }),
                U.push(E === a.CandleType.CandleStroke || E === a.CandleType.CandleUpStroke && L > x || E === a.CandleType.CandleDownStroke && x > L ? {
                    name: "rect",
                    attrs: {
                        x: f - M,
                        y: O[1],
                        width: k - 1,
                        height: z
                    },
                    styles: {
                        style: a.PolygonType.Stroke,
                        borderColor: d
                    }
                } : {
                    name: "rect",
                    attrs: {
                        x: f - M,
                        y: O[1],
                        width: k,
                        height: z
                    },
                    styles: {
                        style: a.PolygonType.StrokeFill,
                        color: h,
                        borderColor: d
                    }
                }),
                U.push({
                    name: "rect",
                    attrs: {
                        x: f - .5,
                        y: O[2],
                        width: 1,
                        height: O[3] - O[2]
                    },
                    styles: {
                        color: p
                    }
                })) : U = [{
                    name: "rect",
                    attrs: {
                        x: f - .5,
                        y: O[0],
                        width: 1,
                        height: O[3] - O[0]
                    },
                    styles: {
                        color: h
                    }
                }, {
                    name: "rect",
                    attrs: {
                        x: f - M,
                        y: F,
                        width: M,
                        height: 1
                    },
                    styles: {
                        color: h
                    }
                }, {
                    name: "rect",
                    attrs: {
                        x: f,
                        y: N,
                        width: M,
                        height: 1
                    },
                    styles: {
                        color: h
                    }
                }],
                U.forEach(function($) {
                    var se, te, ne = $.attrs, ye = $.styles;
                    c && (te = {
                        mouseClickEvent: g._boundCandleBarClickEvent(o)
                    }),
                    (se = g.createFigure("rect", ne, ye, te)) === null || se === void 0 || se.draw(t)
                })
            }
            ,
            e
        }(si)
          , z1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.getCandleBarOptions = function(t) {
                var i, o, s = this.getWidget().getPane();
                if (!s.getAxisComponent().isInCandle()) {
                    var u = t.getIndicatorStore().getInstances(s.getId());
                    try {
                        for (var c = tt(u), h = c.next(); !h.done; h = c.next()) {
                            var d = h.value[1];
                            if (d.shouldOhlc && d.visible) {
                                var p = d.styles
                                  , g = t.getStyles().indicator
                                  , y = ue(p, "ohlc.upColor", g.ohlc.upColor)
                                  , f = ue(p, "ohlc.downColor", g.ohlc.downColor)
                                  , x = ue(p, "ohlc.noChangeColor", g.ohlc.noChangeColor);
                                return {
                                    type: a.CandleType.Ohlc,
                                    styles: {
                                        upColor: y,
                                        downColor: f,
                                        noChangeColor: x,
                                        upBorderColor: y,
                                        downBorderColor: f,
                                        noChangeBorderColor: x,
                                        upWickColor: y,
                                        downWickColor: f,
                                        noChangeWickColor: x
                                    }
                                }
                            }
                        }
                    } catch (_) {
                        i = {
                            error: _
                        }
                    } finally {
                        try {
                            h && !h.done && (o = c.return) && o.call(c)
                        } finally {
                            if (i)
                                throw i.error
                        }
                    }
                }
                return null
            }
            ,
            e.prototype.drawImp = function(t) {
                var i, o = this;
                r.prototype.drawImp.call(this, t);
                var s = this.getWidget()
                  , u = s.getPane()
                  , c = u.getChart()
                  , h = s.getBounding()
                  , d = (i = c.getPaneById(Ze)) === null || i === void 0 ? void 0 : i.getAxisComponent()
                  , p = u.getAxisComponent()
                  , g = c.getChartStore()
                  , y = g.getDataList()
                  , f = g.getTimeScaleStore()
                  , x = f.getVisibleRange()
                  , _ = g.getIndicatorStore().getInstances(u.getId())
                  , w = g.getStyles().indicator;
                _.forEach(function(L) {
                    var M;
                    if (L.visible) {
                        var k = !1;
                        if (L.draw !== null && (t.save(),
                        k = (M = L.draw({
                            ctx: t,
                            kLineDataList: y,
                            indicator: L,
                            visibleRange: x,
                            bounding: h,
                            barSpace: f.getBarSpace(),
                            defaultStyles: w,
                            xAxis: d,
                            yAxis: p
                        })) !== null && M !== void 0 && M,
                        t.restore()),
                        !k) {
                            var E = L.result
                              , D = []
                              , F = []
                              , N = [];
                            o.eachChildren(function(O, z) {
                                var U, $ = z.halfGapBar, se = z.gapBar, te = O.dataIndex, ne = O.x, ye = (U = E[te]) !== null && U !== void 0 ? U : {};
                                $n(y, L, te, w, function(Se, he, Me, Ee) {
                                    var qe, ke, Ne, Qe = ye[Se.key], Re = p.convertToPixel(Qe);
                                    switch (Se.type) {
                                    case "circle":
                                        T(Qe) && ((qe = o.createFigure("circle", {
                                            x: ne,
                                            y: Re,
                                            r: $
                                        }, {
                                            style: he.style,
                                            color: he.color,
                                            borderColor: he.color
                                        })) === null || qe === void 0 || qe.draw(t));
                                        break;
                                    case "bar":
                                        if (T(Qe)) {
                                            var Ue = (ke = Se.baseValue) !== null && ke !== void 0 ? ke : p.getExtremum().min
                                              , _t = p.convertToPixel(Ue)
                                              , st = Math.abs(_t - Re);
                                            Ue !== Qe && (st = Math.max(1, st)),
                                            (Ne = o.createFigure("rect", {
                                                x: ne - $,
                                                y: Re > _t ? _t : Re,
                                                width: se,
                                                height: st
                                            }, {
                                                style: he.style,
                                                color: he.color,
                                                borderColor: he.color
                                            })) === null || Ne === void 0 || Ne.draw(t)
                                        }
                                        break;
                                    case "line":
                                        var It = null;
                                        if (T(Qe)) {
                                            It = he;
                                            var bt = {
                                                x: ne,
                                                y: Re
                                            }
                                              , Xe = D[Ee];
                                            T(F[Ee]) || (F[Ee] = []),
                                            F[Ee].push(bt),
                                            T(Xe) && ((Xe == null ? void 0 : Xe.color) !== he.color || (Xe == null ? void 0 : Xe.style) !== he.style) && (N.push({
                                                name: "line",
                                                attrs: {
                                                    coordinates: F[Ee]
                                                },
                                                styles: {
                                                    style: he.style,
                                                    color: he.color,
                                                    size: Me.size,
                                                    smooth: Me.smooth,
                                                    dashedValue: Me.dashedValue
                                                }
                                            }),
                                            F[Ee] = [bt]),
                                            te === x.to - 1 && N.push({
                                                name: "line",
                                                attrs: {
                                                    coordinates: F[Ee]
                                                },
                                                styles: {
                                                    style: he.style,
                                                    color: he == null ? void 0 : he.color,
                                                    size: Me.size,
                                                    smooth: Me.smooth,
                                                    dashedValue: Me.dashedValue
                                                }
                                            })
                                        }
                                        D[Ee] = It
                                    }
                                })
                            }),
                            N.forEach(function(O) {
                                var z;
                                (z = o.createFigure("line", O.attrs, O.styles)) === null || z === void 0 || z.draw(t)
                            })
                        }
                    }
                })
            }
            ,
            e
        }(po)
          , Y1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.drawImp = function(t) {
                var i = this.getWidget()
                  , o = i.getPane()
                  , s = i.getBounding()
                  , u = i.getPane().getChart().getChartStore()
                  , c = u.getCrosshairStore().get()
                  , h = u.getStyles().crosshair;
                if (c.paneId !== void 0 && h.show) {
                    if (c.paneId === o.getId()) {
                        var d = c.y;
                        this._drawLine(t, [{
                            x: 0,
                            y: d
                        }, {
                            x: s.width,
                            y: d
                        }], h.horizontal)
                    }
                    var p = c.realX;
                    this._drawLine(t, [{
                        x: p,
                        y: 0
                    }, {
                        x: p,
                        y: s.height
                    }], h.vertical)
                }
            }
            ,
            e.prototype._drawLine = function(t, i, o) {
                var s;
                if (o.show) {
                    var u = o.line;
                    u.show && ((s = this.createFigure("line", {
                        coordinates: i
                    }, u)) === null || s === void 0 || s.draw(t))
                }
            }
            ,
            e
        }(at)
          , go = function(r) {
            function e() {
                var t = r !== null && r.apply(this, arguments) || this;
                return t._boundIconClickEvent = function(i, o) {
                    return function() {
                        return t.getWidget().getPane().getChart().getChartStore().getActionStore().execute(a.ActionType.OnTooltipIconClick, X(X({}, i), {
                            iconId: o
                        })),
                        !0
                    }
                }
                ,
                t._boundIconMouseMoveEvent = function(i, o) {
                    return function() {
                        return t.getWidget().getPane().getChart().getChartStore().getTooltipStore().setActiveIconInfo(X(X({}, i), {
                            iconId: o
                        })),
                        !0
                    }
                }
                ,
                t
            }
            return ee(e, r),
            e.prototype.drawImp = function(t) {
                var i = this.getWidget()
                  , o = i.getPane()
                  , s = o.getChart().getChartStore()
                  , u = s.getCrosshairStore().get();
                if (u.kLineData !== void 0) {
                    var c = i.getBounding()
                      , h = s.getCustomApi()
                      , d = s.getThousandsSeparator()
                      , p = s.getIndicatorStore().getInstances(o.getId())
                      , g = s.getTooltipStore().getActiveIconInfo()
                      , y = s.getStyles().indicator;
                    this.drawIndicatorTooltip(t, o.getId(), s.getDataList(), u, g, p, h, d, c, y)
                }
            }
            ,
            e.prototype.drawIndicatorTooltip = function(t, i, o, s, u, c, h, d, p, g, y) {
                var f = this
                  , x = g.tooltip
                  , _ = 0;
                if (this.isDrawTooltip(s, x)) {
                    var w = x.text
                      , L = 0
                      , M = y ?? 0
                      , k = 0;
                    c.forEach(function(E) {
                        var D = f.getIndicatorTooltipData(o, s, E, h, d, g)
                          , F = D.name
                          , N = D.calcParamsText
                          , O = D.values
                          , z = F.length > 0
                          , U = O.length > 0;
                        if (z || U) {
                            var $ = q(f.classifyTooltipIcons(D.icons), 3)
                              , se = $[1]
                              , te = $[2]
                              , ne = q(f.drawStandardTooltipIcons(t, p, {
                                paneId: i,
                                indicatorName: E.name,
                                iconId: ""
                            }, u, $[0], L, M, k), 4);
                            if (L = ne[0],
                            M = ne[1],
                            _ += ne[3],
                            k = ne[2],
                            z) {
                                var ye = F;
                                N.length > 0 && (ye = "".concat(ye).concat(N));
                                var Se = q(f.drawStandardTooltipLabels(t, p, [{
                                    title: {
                                        text: "",
                                        color: w.color
                                    },
                                    value: {
                                        text: ye,
                                        color: w.color
                                    }
                                }], L, M, k, w), 4);
                                L = Se[0],
                                M = Se[1],
                                _ += Se[3],
                                k = Se[2]
                            }
                            var he = q(f.drawStandardTooltipIcons(t, p, {
                                paneId: i,
                                indicatorName: E.name,
                                iconId: ""
                            }, u, se, L, M, k), 4);
                            if (L = he[0],
                            M = he[1],
                            _ += he[3],
                            k = he[2],
                            U) {
                                var Me = q(f.drawStandardTooltipLabels(t, p, O, L, M, k, w), 4);
                                L = Me[0],
                                M = Me[1],
                                _ += Me[3],
                                k = Me[2]
                            }
                            var Ee = q(f.drawStandardTooltipIcons(t, p, {
                                paneId: i,
                                indicatorName: E.name,
                                iconId: ""
                            }, u, te, L, M, k), 4);
                            L = 0,
                            _ += Ee[3],
                            M = Ee[1] + Ee[2],
                            k = 0
                        }
                    })
                }
                return _
            }
            ,
            e.prototype.drawStandardTooltipIcons = function(t, i, o, s, u, c, h, d) {
                var p = this
                  , g = c
                  , y = h
                  , f = 0
                  , x = 0
                  , _ = 0;
                return u.length > 0 && (u.forEach(function(w) {
                    var L = w.marginLeft
                      , M = w.marginTop
                      , k = w.marginRight
                      , E = w.marginBottom
                      , D = w.paddingLeft
                      , F = w.paddingTop
                      , N = w.paddingRight
                      , O = w.paddingBottom
                      , z = w.size
                      , U = w.icon;
                    t.font = Q(z, "normal", w.fontFamily),
                    f += L + D + t.measureText(U).width + N + k,
                    x = Math.max(x, M + F + z + O + E)
                }),
                g + f > i.width ? (g = u[0].marginLeft,
                y += d,
                _ = x) : _ = Math.max(0, x - d),
                u.forEach(function(w) {
                    var L, M = w.marginRight, k = w.paddingLeft, E = w.paddingRight, D = w.icon, F = (s == null ? void 0 : s.paneId) === o.paneId && (s == null ? void 0 : s.indicatorName) === o.indicatorName && (s == null ? void 0 : s.iconId) === w.id;
                    (L = p.createFigure("rectText", {
                        text: D,
                        x: g += w.marginLeft,
                        y: y + w.marginTop
                    }, {
                        paddingLeft: k,
                        paddingTop: w.paddingTop,
                        paddingRight: E,
                        paddingBottom: w.paddingBottom,
                        color: F ? w.activeColor : w.color,
                        size: w.size,
                        family: w.fontFamily,
                        backgroundColor: F ? w.activeBackgroundColor : w.backgroundColor
                    }, {
                        mouseClickEvent: p._boundIconClickEvent(o, w.id),
                        mouseMoveEvent: p._boundIconMouseMoveEvent(o, w.id)
                    })) === null || L === void 0 || L.draw(t),
                    g += k + t.measureText(D).width + E + M
                })),
                [g, y, Math.max(d, x), _]
            }
            ,
            e.prototype.drawStandardTooltipLabels = function(t, i, o, s, u, c, h) {
                var d = this
                  , p = s
                  , g = u
                  , y = 0
                  , f = 0
                  , x = c;
                if (o.length > 0) {
                    var _ = h.marginLeft
                      , w = h.marginTop
                      , L = h.marginRight
                      , M = h.marginBottom
                      , k = h.size
                      , E = h.family
                      , D = h.weight;
                    t.font = Q(k, D, E),
                    o.forEach(function(F) {
                        var N, O, z = F.title, U = F.value, $ = t.measureText(z.text).width, se = t.measureText(U.text).width, te = k + w + M;
                        p + _ + ($ + se) + L > i.width ? (p = _,
                        g += te,
                        f += te) : (p += _,
                        f += Math.max(0, te - x)),
                        x = y = Math.max(x, te),
                        z.text.length > 0 && ((N = d.createFigure("text", {
                            x: p,
                            y: g + w,
                            text: z.text
                        }, {
                            color: z.color,
                            size: k,
                            family: E,
                            weight: D
                        })) === null || N === void 0 || N.draw(t),
                        p += $),
                        (O = d.createFigure("text", {
                            x: p,
                            y: g + w,
                            text: U.text
                        }, {
                            color: U.color,
                            size: k,
                            family: E,
                            weight: D
                        })) === null || O === void 0 || O.draw(t),
                        p += se + L
                    })
                }
                return [p, g, y, f]
            }
            ,
            e.prototype.isDrawTooltip = function(t, i) {
                var o = i.showRule;
                return o === a.TooltipShowRule.Always || o === a.TooltipShowRule.FollowCross && t.paneId !== void 0
            }
            ,
            e.prototype.getIndicatorTooltipData = function(t, i, o, s, u, c) {
                var h, d, p, g = c.tooltip, y = g.showName ? o.shortName : "", f = "", x = o.calcParams;
                x.length > 0 && g.showParams && (f = "(".concat(x.join(","), ")"));
                var _ = {
                    name: y,
                    calcParamsText: f,
                    values: [],
                    icons: g.icons
                }
                  , w = i.dataIndex
                  , L = (h = o.result) !== null && h !== void 0 ? h : []
                  , M = [];
                if (o.visible) {
                    var k = (d = L[w]) !== null && d !== void 0 ? d : {};
                    $n(t, o, w, c, function(ne, ye) {
                        if (ne.title !== void 0) {
                            var Se = ye.color
                              , he = k[ne.key];
                            T(he) && (he = G(he, o.precision),
                            o.shouldFormatBigNumber && (he = s.formatBigNumber(he))),
                            M.push({
                                title: {
                                    text: ne.title,
                                    color: Se
                                },
                                value: {
                                    text: Ce(he ?? g.defaultValue, u),
                                    color: Se
                                }
                            })
                        }
                    }),
                    _.values = M
                }
                if (o.createTooltipDataSource !== null) {
                    var E = this.getWidget()
                      , D = E.getPane()
                      , F = D.getChart().getChartStore()
                      , N = o.createTooltipDataSource({
                        kLineDataList: t,
                        indicator: o,
                        visibleRange: F.getTimeScaleStore().getVisibleRange(),
                        bounding: E.getBounding(),
                        crosshair: i,
                        defaultStyles: c,
                        xAxis: (p = D.getChart().getPaneById(Ze)) === null || p === void 0 ? void 0 : p.getAxisComponent(),
                        yAxis: D.getAxisComponent()
                    })
                      , O = N.name
                      , z = N.calcParamsText
                      , U = N.values
                      , $ = N.icons;
                    if (O !== void 0 && g.showName && (_.name = O),
                    z !== void 0 && g.showParams && (_.calcParamsText = z),
                    $ !== void 0 && (_.icons = $),
                    U !== void 0 && o.visible) {
                        var se = []
                          , te = c.tooltip.text.color;
                        U.forEach(function(ne) {
                            var ye = {
                                text: "",
                                color: te
                            };
                            b(ne.title) ? ye = ne.title : ye.text = ne.title;
                            var Se = {
                                text: "",
                                color: te
                            };
                            b(ne.value) ? Se = ne.value : Se.text = ne.value,
                            Se.text = Ce(Se.text, u),
                            se.push({
                                title: ye,
                                value: Se
                            })
                        }),
                        _.values = se
                    }
                }
                return _
            }
            ,
            e.prototype.classifyTooltipIcons = function(t) {
                var i = []
                  , o = []
                  , s = [];
                return t.forEach(function(u) {
                    switch (u.position) {
                    case a.TooltipIconPosition.Left:
                        i.push(u);
                        break;
                    case a.TooltipIconPosition.Middle:
                        o.push(u);
                        break;
                    case a.TooltipIconPosition.Right:
                        s.push(u)
                    }
                }),
                [i, o, s]
            }
            ,
            e
        }(at)
          , vo = function(r) {
            function e(t) {
                var i = r.call(this, t) || this;
                return i._initEvent(),
                i
            }
            return ee(e, r),
            e.prototype._initEvent = function() {
                var t = this
                  , i = this.getWidget().getPane()
                  , o = i.getId()
                  , s = i.getChart().getChartStore().getOverlayStore();
                this.registerEvent("mouseMoveEvent", function(u) {
                    var c, h = s.getProgressInstanceInfo();
                    if (h !== null) {
                        var d = h.instance
                          , p = h.paneId;
                        d.isStart() && (s.updateProgressInstanceInfo(o),
                        p = o);
                        var g = d.points.length - 1
                          , y = "".concat(an, "point_").concat(g);
                        return d.isDrawing() && p === o && (d.eventMoveForDrawing(t._coordinateToPoint(h.instance, u)),
                        (c = d.onDrawing) === null || c === void 0 || c.call(d, X({
                            overlay: d,
                            figureKey: y,
                            figureIndex: g
                        }, u))),
                        t._figureMouseMoveEvent(d, 1, y, g, 0)(u)
                    }
                    return s.setHoverInstanceInfo({
                        paneId: o,
                        instance: null,
                        figureType: 0,
                        figureKey: "",
                        figureIndex: -1,
                        attrsIndex: -1
                    }, u),
                    !1
                }).registerEvent("mouseClickEvent", function(u) {
                    var c, h, d = s.getProgressInstanceInfo();
                    if (d !== null) {
                        var p = d.instance
                          , g = d.paneId;
                        p.isStart() && (s.updateProgressInstanceInfo(o, !0),
                        g = o);
                        var y = p.points.length - 1
                          , f = "".concat(an, "point_").concat(y);
                        return p.isDrawing() && g === o && (p.eventMoveForDrawing(t._coordinateToPoint(p, u)),
                        (c = p.onDrawing) === null || c === void 0 || c.call(p, X({
                            overlay: p,
                            figureKey: f,
                            figureIndex: y
                        }, u)),
                        p.nextStep(),
                        p.isDrawing() || (s.progressInstanceComplete(),
                        (h = p.onDrawEnd) === null || h === void 0 || h.call(p, X({
                            overlay: p,
                            figureKey: f,
                            figureIndex: y
                        }, u)))),
                        t._figureMouseClickEvent(p, 1, f, y, 0)(u)
                    }
                    return s.setClickInstanceInfo({
                        paneId: o,
                        instance: null,
                        figureType: 0,
                        figureKey: "",
                        figureIndex: -1,
                        attrsIndex: -1
                    }, u),
                    !1
                }).registerEvent("mouseDoubleClickEvent", function(u) {
                    var c, h = s.getProgressInstanceInfo();
                    if (h !== null) {
                        var d = h.instance
                          , p = h.paneId;
                        if (d.isDrawing() && p === o && (d.forceComplete(),
                        !d.isDrawing())) {
                            s.progressInstanceComplete();
                            var g = d.points.length - 1
                              , y = "".concat(an, "point_").concat(g);
                            (c = d.onDrawEnd) === null || c === void 0 || c.call(d, X({
                                overlay: d,
                                figureKey: y,
                                figureIndex: g
                            }, u))
                        }
                        return !0
                    }
                    return !1
                }).registerEvent("mouseRightClickEvent", function(u) {
                    var c = s.getProgressInstanceInfo();
                    if (c !== null) {
                        var h = c.instance;
                        if (h.isDrawing()) {
                            var d = h.points.length - 1;
                            return t._figureMouseRightClickEvent(h, 1, "".concat(an, "point_").concat(d), d, 0)(u)
                        }
                    }
                    return !1
                }).registerEvent("mouseUpEvent", function(u) {
                    var c, h = s.getPressedInstanceInfo(), d = h.instance;
                    return d !== null && ((c = d.onPressedMoveEnd) === null || c === void 0 || c.call(d, X({
                        overlay: d,
                        figureKey: h.figureKey,
                        figureIndex: h.figureIndex
                    }, u))),
                    s.setPressedInstanceInfo({
                        paneId: o,
                        instance: null,
                        figureType: 0,
                        figureKey: "",
                        figureIndex: -1,
                        attrsIndex: -1
                    }),
                    !1
                }).registerEvent("pressedMouseMoveEvent", function(u) {
                    var c, h, d = s.getPressedInstanceInfo(), p = d.instance, g = d.figureType, y = d.figureIndex;
                    if (p !== null) {
                        if (!(p.lock || (h = (c = p.onPressedMoving) === null || c === void 0 ? void 0 : c.call(p, X({
                            overlay: p,
                            figureIndex: y,
                            figureKey: d.figureKey
                        }, u))) !== null && h !== void 0 && h)) {
                            var f = t._coordinateToPoint(p, u);
                            g === 1 ? p.eventPressedPointMove(f, y) : p.eventPressedOtherMove(f, t.getWidget().getPane().getChart().getChartStore().getTimeScaleStore())
                        }
                        return !0
                    }
                    return !1
                })
            }
            ,
            e.prototype._createFigureEvents = function(t, i, o, s, u, c) {
                var h;
                if (!t.isDrawing()) {
                    var d = [];
                    if (c !== void 0 && (I(c) ? c && (d = ["mouseClickEvent", "mouseRightClickEvent", "tapEvent", "mouseDownEvent", "touchStartEvent", "mouseMoveEvent", "touchMoveEvent"]) : d = c),
                    d.length === 0)
                        return {
                            mouseMoveEvent: this._figureMouseMoveEvent(t, i, o, s, u),
                            mouseDownEvent: this._figureMouseDownEvent(t, i, o, s, u),
                            mouseClickEvent: this._figureMouseClickEvent(t, i, o, s, u),
                            mouseRightClickEvent: this._figureMouseRightClickEvent(t, i, o, s, u)
                        };
                    h = {},
                    d.includes("mouseMoveEvent") || d.includes("touchMoveEvent") || (h.mouseMoveEvent = this._figureMouseMoveEvent(t, i, o, s, u)),
                    d.includes("mouseDownEvent") || d.includes("touchStartEvent") || (h.mouseDownEvent = this._figureMouseDownEvent(t, i, o, s, u)),
                    d.includes("mouseClickEvent") || d.includes("tapEvent") || (h.mouseClickEvent = this._figureMouseClickEvent(t, i, o, s, u)),
                    d.includes("mouseRightClickEvent") || (h.mouseRightClickEvent = this._figureMouseRightClickEvent(t, i, o, s, u))
                }
                return h
            }
            ,
            e.prototype._figureMouseMoveEvent = function(t, i, o, s, u) {
                var c = this;
                return function(h) {
                    var d = c.getWidget().getPane();
                    return d.getChart().getChartStore().getOverlayStore().setHoverInstanceInfo({
                        paneId: d.getId(),
                        instance: t,
                        figureType: i,
                        figureKey: o,
                        figureIndex: s,
                        attrsIndex: u
                    }, h),
                    !0
                }
            }
            ,
            e.prototype._figureMouseDownEvent = function(t, i, o, s, u) {
                var c = this;
                return function(h) {
                    var d, p = c.getWidget().getPane(), g = p.getId(), y = p.getChart().getChartStore().getOverlayStore();
                    return t.startPressedMove(c._coordinateToPoint(t, h)),
                    (d = t.onPressedMoveStart) === null || d === void 0 || d.call(t, X({
                        overlay: t,
                        figureIndex: s,
                        figureKey: o
                    }, h)),
                    y.setPressedInstanceInfo({
                        paneId: g,
                        instance: t,
                        figureType: i,
                        figureKey: o,
                        figureIndex: s,
                        attrsIndex: u
                    }),
                    !0
                }
            }
            ,
            e.prototype._figureMouseClickEvent = function(t, i, o, s, u) {
                var c = this;
                return function(h) {
                    var d = c.getWidget().getPane()
                      , p = d.getId();
                    return d.getChart().getChartStore().getOverlayStore().setClickInstanceInfo({
                        paneId: p,
                        instance: t,
                        figureType: i,
                        figureKey: o,
                        figureIndex: s,
                        attrsIndex: u
                    }, h),
                    !0
                }
            }
            ,
            e.prototype._figureMouseRightClickEvent = function(t, i, o, s, u) {
                var c = this;
                return function(h) {
                    var d, p;
                    return (p = (d = t.onRightClick) === null || d === void 0 ? void 0 : d.call(t, X({
                        overlay: t,
                        figureIndex: s,
                        figureKey: o
                    }, h))) !== null && p !== void 0 && p || c.getWidget().getPane().getChart().getChartStore().getOverlayStore().removeInstance(t),
                    !0
                }
            }
            ,
            e.prototype._coordinateToPoint = function(t, i) {
                var o, s, u = {}, c = this.getWidget().getPane(), h = c.getChart(), d = c.getId(), p = h.getChartStore().getTimeScaleStore();
                if (this.coordinateToPointTimestampDataIndexFlag()) {
                    var g = ((o = h.getPaneById(Ze)) === null || o === void 0 ? void 0 : o.getAxisComponent()).convertFromPixel(i.x)
                      , y = (s = p.dataIndexToTimestamp(g)) !== null && s !== void 0 ? s : void 0;
                    u.dataIndex = g,
                    u.timestamp = y
                }
                if (this.coordinateToPointValueFlag()) {
                    var f = c.getAxisComponent()
                      , x = f.convertFromPixel(i.y);
                    if (t.mode !== a.OverlayMode.Normal && d === We && u.dataIndex !== void 0) {
                        var _ = p.getDataByDataIndex(u.dataIndex);
                        if (_ !== null)
                            if (x > _.high)
                                if (t.mode === a.OverlayMode.WeakMagnet) {
                                    var w = f.convertToPixel(_.high);
                                    f.convertFromPixel(w - 8) > x && (x = _.high)
                                } else
                                    x = _.high;
                            else if (_.low > x)
                                if (t.mode === a.OverlayMode.WeakMagnet) {
                                    var L = f.convertToPixel(_.low);
                                    x > f.convertFromPixel(L - 8) && (x = _.low)
                                } else
                                    x = _.low;
                            else {
                                var M = Math.max(_.open, _.close)
                                  , k = Math.min(_.open, _.close);
                                x = x > M ? _.high - x > x - M ? M : _.high : k > x ? k - x > x - _.low ? _.low : k : x - k > M - x ? M : k
                            }
                    }
                    u.value = x
                }
                return u
            }
            ,
            e.prototype.coordinateToPointValueFlag = function() {
                return !0
            }
            ,
            e.prototype.coordinateToPointTimestampDataIndexFlag = function() {
                return !0
            }
            ,
            e.prototype.dispatchEvent = function(t, i, o) {
                return this.getWidget().getPane().getChart().getChartStore().getOverlayStore().isDrawing() ? this.onEvent(t, i, o) : r.prototype.dispatchEvent.call(this, t, i, o)
            }
            ,
            e.prototype.checkEventOn = function() {
                return !0
            }
            ,
            e.prototype.drawImp = function(t) {
                var i, o = this, s = this.getWidget(), u = s.getPane(), c = u.getId(), h = u.getChart(), d = u.getAxisComponent(), p = (i = h.getPaneById(Ze)) === null || i === void 0 ? void 0 : i.getAxisComponent(), g = s.getBounding(), y = h.getChartStore(), f = y.getCustomApi(), x = y.getThousandsSeparator(), _ = y.getTimeScaleStore(), w = _.getDateTimeFormat(), L = _.getBarSpace(), M = y.getPrecision(), k = y.getStyles().overlay, E = y.getOverlayStore(), D = E.getHoverInstanceInfo(), F = E.getClickInstanceInfo();
                this.getCompleteOverlays(E, c).forEach(function(z) {
                    z.visible && o._drawOverlay(t, z, g, L, M, w, f, x, k, p, d, D, F, _)
                });
                var N = E.getProgressInstanceInfo();
                if (N !== null) {
                    var O = this.getProgressOverlay(N, c);
                    O !== null && O.visible && this._drawOverlay(t, O, g, L, M, w, f, x, k, p, d, D, F, _)
                }
            }
            ,
            e.prototype._drawOverlay = function(t, i, o, s, u, c, h, d, p, g, y, f, x, _) {
                var w = i.points.map(function(M) {
                    var k, E, D = M.dataIndex;
                    M.timestamp !== void 0 && (D = _.timestampToDataIndex(M.timestamp));
                    var F = {
                        x: 0,
                        y: 0
                    };
                    return D !== void 0 && (F.x = (k = g == null ? void 0 : g.convertToPixel(D)) !== null && k !== void 0 ? k : 0),
                    M.value !== void 0 && (F.y = (E = y == null ? void 0 : y.convertToPixel(M.value)) !== null && E !== void 0 ? E : 0),
                    F
                });
                if (w.length > 0) {
                    var L = [].concat(this.getFigures(i, w, o, s, u, d, c, p, g, y));
                    this.drawFigures(t, i, L, p)
                }
                this.drawDefaultFigures(t, i, w, o, u, c, h, d, p, g, y, f, x)
            }
            ,
            e.prototype.drawFigures = function(t, i, o, s) {
                var u = this;
                o.forEach(function(c, h) {
                    var d = c.type
                      , p = c.styles
                      , g = c.ignoreEvent;
                    [].concat(c.attrs).forEach(function(y, f) {
                        var x, _, w, L = u._createFigureEvents(i, 2, (x = c.key) !== null && x !== void 0 ? x : "", h, f, g), M = X(X(X({}, s[d]), (_ = i.styles) === null || _ === void 0 ? void 0 : _[d]), p);
                        (w = u.createFigure(d, y, M, L)) === null || w === void 0 || w.draw(t)
                    })
                })
            }
            ,
            e.prototype.getCompleteOverlays = function(t, i) {
                return t.getInstances(i)
            }
            ,
            e.prototype.getProgressOverlay = function(t, i) {
                return t.paneId === i ? t.instance : null
            }
            ,
            e.prototype.getFigures = function(t, i, o, s, u, c, h, d, p, g) {
                var y, f;
                return (f = (y = t.createPointFigures) === null || y === void 0 ? void 0 : y.call(t, {
                    overlay: t,
                    coordinates: i,
                    bounding: o,
                    barSpace: s,
                    precision: u,
                    thousandsSeparator: c,
                    dateTimeFormat: h,
                    defaultStyles: d,
                    xAxis: p,
                    yAxis: g
                })) !== null && f !== void 0 ? f : []
            }
            ,
            e.prototype.drawDefaultFigures = function(t, i, o, s, u, c, h, d, p, g, y, f, x) {
                var _, w, L = this;
                if (i.needDefaultPointFigure && (((_ = f.instance) === null || _ === void 0 ? void 0 : _.id) === i.id && f.figureType !== 0 || ((w = x.instance) === null || w === void 0 ? void 0 : w.id) === i.id && x.figureType !== 0)) {
                    var M = i.styles
                      , k = X(X({}, p.point), M == null ? void 0 : M.point);
                    o.forEach(function(E, D) {
                        var F, N, O, z = E.x, U = E.y, $ = k.radius, se = k.color, te = k.borderColor, ne = k.borderSize;
                        ((F = f.instance) === null || F === void 0 ? void 0 : F.id) === i.id && f.figureType === 1 && f.figureIndex === D && ($ = k.activeRadius,
                        se = k.activeColor,
                        te = k.activeBorderColor,
                        ne = k.activeBorderSize),
                        (N = L.createFigure("circle", {
                            x: z,
                            y: U,
                            r: $ + ne
                        }, {
                            color: te
                        }, L._createFigureEvents(i, 1, "".concat(an, "point_").concat(D), D, 0))) === null || N === void 0 || N.draw(t),
                        (O = L.createFigure("circle", {
                            x: z,
                            y: U,
                            r: $
                        }, {
                            color: se
                        })) === null || O === void 0 || O.draw(t)
                    })
                }
            }
            ,
            e
        }(at)
          , fo = function(r) {
            function e(t, i) {
                var o = r.call(this, t, i) || this;
                return o._gridView = new O1(o),
                o._indicatorView = new z1(o),
                o._crosshairLineView = new Y1(o),
                o._tooltipView = o.createTooltipView(),
                o._overlayView = new vo(o),
                o.addChild(o._tooltipView),
                o.addChild(o._overlayView),
                o.getContainer().style.cursor = "crosshair",
                o.registerEvent("mouseMoveEvent", function() {
                    return i.getChart().getChartStore().getTooltipStore().setActiveIconInfo(),
                    !1
                }),
                o
            }
            return ee(e, r),
            e.prototype.getName = function() {
                return je
            }
            ,
            e.prototype.updateMain = function(t) {
                this.updateMainContent(t),
                this._indicatorView.draw(t),
                this._gridView.draw(t)
            }
            ,
            e.prototype.createTooltipView = function() {
                return new go(this)
            }
            ,
            e.prototype.updateMainContent = function(t) {}
            ,
            e.prototype.updateOverlay = function(t) {
                this._overlayView.draw(t),
                this._crosshairLineView.draw(t),
                this._tooltipView.draw(t)
            }
            ,
            e
        }(ii)
          , V1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.drawImp = function(t) {
                var i, o, s = this.getWidget(), u = s.getPane(), c = u.getChart(), h = s.getBounding(), d = u.getAxisComponent(), p = c.getStyles().candle.area, g = [], y = [], f = Number.MAX_SAFE_INTEGER;
                this.eachChildren(function(E, D, F) {
                    var N = E.x
                      , O = D.halfGapBar
                      , z = E.data[p.value];
                    if (A(z)) {
                        var U = d.convertToPixel(z);
                        if (F === 0) {
                            var $ = N - O;
                            y.push({
                                x: $,
                                y: h.height
                            }),
                            y.push({
                                x: $,
                                y: U
                            }),
                            g.push({
                                x: $,
                                y: U
                            })
                        }
                        g.push({
                            x: N,
                            y: U
                        }),
                        y.push({
                            x: N,
                            y: U
                        }),
                        f = Math.min(f, U)
                    }
                });
                var x = y.length;
                if (x > 0) {
                    var _ = y[x - 1]
                      , w = _.x;
                    g.push({
                        x: w,
                        y: _.y
                    }),
                    y.push({
                        x: w,
                        y: _.y
                    }),
                    y.push({
                        x: w,
                        y: h.height
                    })
                }
                if (g.length > 0 && ((i = this.createFigure("line", {
                    coordinates: g
                }, {
                    color: p.lineColor,
                    size: p.lineSize
                })) === null || i === void 0 || i.draw(t)),
                y.length > 0) {
                    var L = p.backgroundColor
                      , M = void 0;
                    if (C(L)) {
                        var k = t.createLinearGradient(0, h.height, 0, f);
                        try {
                            L.forEach(function(E) {
                                k.addColorStop(E.offset, E.color)
                            })
                        } catch {}
                        M = k
                    } else
                        M = L;
                    (o = this.createFigure("polygon", {
                        coordinates: y
                    }, {
                        color: M
                    })) === null || o === void 0 || o.draw(t)
                }
            }
            ,
            e
        }(si)
          , j1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.drawImp = function(t) {
                var i = this.getWidget().getPane()
                  , o = i.getChart().getChartStore()
                  , s = o.getStyles().candle.priceMark
                  , u = s.high
                  , c = s.low;
                if (s.show && (u.show || c.show)) {
                    var h = o.getThousandsSeparator()
                      , d = o.getPrecision()
                      , p = i.getAxisComponent()
                      , g = Number.MIN_SAFE_INTEGER
                      , y = 0
                      , f = Number.MAX_SAFE_INTEGER
                      , x = 0;
                    this.eachChildren(function(L) {
                        var M = L.data
                          , k = L.x;
                        M.high > g && (g = M.high,
                        y = k),
                        f > M.low && (f = M.low,
                        x = k)
                    });
                    var _ = p.convertToPixel(g)
                      , w = p.convertToPixel(f);
                    u.show && g !== Number.MIN_SAFE_INTEGER && this._drawMark(t, Ce(G(g, d.price), h), {
                        x: y,
                        y: _
                    }, w > _ ? [-2, -5] : [2, 5], u),
                    c.show && f !== Number.MAX_SAFE_INTEGER && this._drawMark(t, Ce(G(f, d.price), h), {
                        x,
                        y: w
                    }, w > _ ? [2, 5] : [-2, -5], c)
                }
            }
            ,
            e.prototype._drawMark = function(t, i, o, s, u) {
                var c, h, d, p, g, y, f = o.x, x = o.y + s[0];
                (c = this.createFigure("line", {
                    coordinates: [{
                        x: f - 2,
                        y: x + s[0]
                    }, {
                        x: f,
                        y: x
                    }, {
                        x: f + 2,
                        y: x + s[0]
                    }]
                }, {
                    color: u.color
                })) === null || c === void 0 || c.draw(t),
                f > this.getWidget().getBounding().width / 2 ? (g = (p = f - 5) - u.textOffset,
                y = "right") : (y = "left",
                g = (p = f + 5) + u.textOffset);
                var _ = x + s[1];
                (h = this.createFigure("line", {
                    coordinates: [{
                        x: f,
                        y: x
                    }, {
                        x: f,
                        y: _
                    }, {
                        x: p,
                        y: _
                    }]
                }, {
                    color: u.color
                })) === null || h === void 0 || h.draw(t),
                (d = this.createFigure("text", {
                    x: g,
                    y: _,
                    text: i,
                    align: y,
                    baseline: "middle"
                }, {
                    color: u.color,
                    size: u.textSize,
                    family: u.textFamily,
                    weight: u.textWeight
                })) === null || d === void 0 || d.draw(t)
            }
            ,
            e
        }(si)
          , W1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.drawImp = function(t) {
                var i, o = this.getWidget(), s = o.getPane(), u = o.getBounding(), c = s.getChart().getChartStore(), h = c.getStyles().candle.priceMark, d = h.last, p = d.line;
                if (h.show && d.show && p.show) {
                    var g = s.getAxisComponent()
                      , y = c.getDataList()
                      , f = y[y.length - 1];
                    if (f != null) {
                        var x = f.close
                          , _ = f.open
                          , w = g.convertToNicePixel(x);
                        (i = this.createFigure("line", {
                            coordinates: [{
                                x: 0,
                                y: w
                            }, {
                                x: u.width,
                                y: w
                            }]
                        }, {
                            style: p.style,
                            color: x > _ ? d.upColor : _ > x ? d.downColor : d.noChangeColor,
                            size: p.size,
                            dashedValue: p.dashedValue
                        })) === null || i === void 0 || i.draw(t)
                    }
                }
            }
            ,
            e
        }(at)
          , bn = {
            "zh-CN": {
                time: "时间：",
                open: "开：",
                high: "高：",
                low: "低：",
                close: "收：",
                volume: "成交量："
            },
            "en-US": {
                time: "Time: ",
                open: "Open: ",
                high: "High: ",
                low: "Low: ",
                close: "Close: ",
                volume: "Volume: "
            }
        };
        function Et(r, e) {
            var t, i;
            return (i = (t = bn[e]) === null || t === void 0 ? void 0 : t[r]) !== null && i !== void 0 ? i : r
        }
        var Q1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.drawImp = function(t) {
                var i, o = this.getWidget(), s = o.getPane(), u = s.getId(), c = s.getChart().getChartStore(), h = c.getCrosshairStore().get();
                if (h.kLineData !== void 0) {
                    var d = o.getBounding()
                      , p = (i = s.getYAxisWidget()) === null || i === void 0 ? void 0 : i.getBounding()
                      , g = c.getDataList()
                      , y = c.getPrecision()
                      , f = c.getLocale()
                      , x = c.getCustomApi()
                      , _ = c.getThousandsSeparator()
                      , w = c.getTooltipStore().getActiveIconInfo()
                      , L = c.getIndicatorStore().getInstances(s.getId())
                      , M = c.getTimeScaleStore().getDateTimeFormat()
                      , k = c.getStyles()
                      , E = k.candle
                      , D = k.indicator;
                    if (E.tooltip.showType === a.TooltipShowType.Rect && D.tooltip.showType === a.TooltipShowType.Rect) {
                        var F = this.isDrawTooltip(h, E.tooltip)
                          , N = this.isDrawTooltip(h, D.tooltip);
                        this._drawRectTooltip(t, g, L, d, p, h, y, M, f, x, _, F, N, k, 0)
                    } else if (E.tooltip.showType === a.TooltipShowType.Standard && D.tooltip.showType === a.TooltipShowType.Standard) {
                        var O = this._drawCandleStandardTooltip(t, g, u, d, h, w, y, M, f, x, _, E);
                        this.drawIndicatorTooltip(t, u, g, h, w, L, x, _, d, D, O)
                    } else if (E.tooltip.showType === a.TooltipShowType.Rect && D.tooltip.showType === a.TooltipShowType.Standard) {
                        var z = this.drawIndicatorTooltip(t, u, g, h, w, L, x, _, d, D, 0);
                        F = this.isDrawTooltip(h, E.tooltip),
                        this._drawRectTooltip(t, g, L, d, p, h, y, M, f, x, _, F, !1, k, z)
                    } else {
                        var U = this._drawCandleStandardTooltip(t, g, u, d, h, w, y, M, f, x, _, E);
                        N = this.isDrawTooltip(h, D.tooltip),
                        this._drawRectTooltip(t, g, L, d, p, h, y, M, f, x, _, !1, N, k, U)
                    }
                }
            }
            ,
            e.prototype._drawCandleStandardTooltip = function(t, i, o, s, u, c, h, d, p, g, y, f) {
                var x, _, w, L = f.tooltip, M = L.text, k = 0;
                if (this.isDrawTooltip(u, L)) {
                    var E = (x = u.dataIndex) !== null && x !== void 0 ? x : 0
                      , D = this._getCandleTooltipData({
                        prev: (_ = i[E - 1]) !== null && _ !== void 0 ? _ : null,
                        current: u.kLineData,
                        next: (w = i[E + 1]) !== null && w !== void 0 ? w : null
                    }, h, d, p, g, y, f)
                      , F = 0
                      , N = 0
                      , O = 0
                      , z = q(this.classifyTooltipIcons(L.icons), 3)
                      , U = z[1]
                      , $ = z[2]
                      , se = q(this.drawStandardTooltipIcons(t, s, {
                        paneId: o,
                        indicatorName: "",
                        iconId: ""
                    }, c, z[0], F, N, 0), 4);
                    k += se[3];
                    var te = q(this.drawStandardTooltipIcons(t, s, {
                        paneId: o,
                        indicatorName: "",
                        iconId: ""
                    }, c, U, F = se[0], N = se[1], O = se[2]), 4);
                    if (F = te[0],
                    N = te[1],
                    k += te[3],
                    O = te[2],
                    D.length > 0) {
                        var ne = q(this.drawStandardTooltipLabels(t, s, D, F, N, O, M), 4);
                        F = ne[0],
                        N = ne[1],
                        k += ne[3],
                        O = ne[2]
                    }
                    var ye = q(this.drawStandardTooltipIcons(t, s, {
                        paneId: o,
                        indicatorName: "",
                        iconId: ""
                    }, c, $, F, N, O), 4);
                    F = ye[0],
                    N = ye[1],
                    k += ye[3],
                    O = ye[2]
                }
                return k
            }
            ,
            e.prototype._drawRectTooltip = function(t, i, o, s, u, c, h, d, p, g, y, f, x, _, w) {
                var L, M, k, E, D, F = this, N = _.candle, O = _.indicator, z = N.tooltip, U = O.tooltip;
                if (f || x) {
                    var $ = (L = c.dataIndex) !== null && L !== void 0 ? L : 0
                      , se = this._getCandleTooltipData({
                        prev: (M = i[$ - 1]) !== null && M !== void 0 ? M : null,
                        current: c.kLineData,
                        next: (k = i[$ + 1]) !== null && k !== void 0 ? k : null
                    }, h, d, p, g, y, N)
                      , te = z.text
                      , ne = te.marginLeft
                      , ye = te.marginRight
                      , Se = te.marginTop
                      , he = te.marginBottom
                      , Me = te.size
                      , Ee = te.weight
                      , qe = te.family
                      , ke = z.rect
                      , Ne = ke.position
                      , Qe = ke.paddingLeft
                      , Re = ke.paddingRight
                      , Ue = ke.paddingTop
                      , _t = ke.paddingBottom
                      , st = ke.offsetLeft
                      , It = ke.offsetRight
                      , bt = ke.offsetTop
                      , Xe = ke.offsetBottom
                      , wt = ke.borderSize
                      , la = ke.borderRadius
                      , ca = ke.borderColor
                      , ua = ke.color
                      , un = 0
                      , Dt = 0
                      , St = 0;
                    f && (t.font = Q(Me, Ee, qe),
                    se.forEach(function(gt) {
                        var Ge = gt.value
                          , $e = "".concat(gt.title.text).concat(Ge.text)
                          , et = t.measureText($e).width + ne + ye;
                        un = Math.max(un, et)
                    }),
                    St += (he + Se + Me) * se.length);
                    var Pt = U.text
                      , So = Pt.marginLeft
                      , Lo = Pt.marginRight
                      , ko = Pt.marginTop
                      , Mo = Pt.marginBottom
                      , hn = Pt.size
                      , ui = Pt.weight
                      , hi = Pt.family
                      , Ao = [];
                    if (x && (t.font = Q(hn, ui, hi),
                    o.forEach(function(gt) {
                        var Ge, $e = (Ge = F.getIndicatorTooltipData(i, c, gt, g, y, O).values) !== null && Ge !== void 0 ? Ge : [];
                        Ao.push($e),
                        $e.forEach(function(et) {
                            var Ft = et.value
                              , Sn = "".concat(et.title.text).concat(Ft.text)
                              , pa = t.measureText(Sn).width + So + Lo;
                            un = Math.max(un, pa),
                            St += ko + Mo + hn
                        })
                    })),
                    (Dt += un) !== 0 && St !== 0) {
                        Dt += 2 * wt + Qe + Re,
                        St += 2 * wt + Ue + _t;
                        var To = Ne === le.Pointer && c.paneId === We
                          , Eo = ((E = c.realX) !== null && E !== void 0 ? E : 0) > s.width / 2
                          , lt = 0;
                        if (To) {
                            var Io = c.realX;
                            lt = Eo ? Io - It - Dt : Io + st
                        } else
                            Eo ? (lt = st,
                            _.yAxis.inside && _.yAxis.position === a.YAxisPosition.Left && (lt += u.width)) : (lt = s.width - It - Dt,
                            _.yAxis.inside && _.yAxis.position === a.YAxisPosition.Right && (lt -= u.width));
                        var Vt = w + bt;
                        To && ((Vt = c.y - St / 2) + St > s.height - Xe && (Vt = s.height - Xe - St),
                        w + bt > Vt && (Vt = w + bt)),
                        (D = this.createFigure("rect", {
                            x: lt,
                            y: Vt,
                            width: Dt,
                            height: St
                        }, {
                            style: a.PolygonType.StrokeFill,
                            color: ua,
                            borderColor: ca,
                            borderSize: wt,
                            borderRadius: la
                        })) === null || D === void 0 || D.draw(t);
                        var ha = lt + wt + Qe + ne
                          , jt = Vt + wt + Ue;
                        if (f && se.forEach(function(gt) {
                            var Ge, $e, et = gt.title;
                            (Ge = F.createFigure("text", {
                                x: ha,
                                y: jt += Se,
                                text: et.text
                            }, {
                                color: et.color,
                                size: Me,
                                family: qe,
                                weight: Ee
                            })) === null || Ge === void 0 || Ge.draw(t);
                            var Ft = gt.value;
                            ($e = F.createFigure("text", {
                                x: lt + Dt - wt - ye - Re,
                                y: jt,
                                text: Ft.text,
                                align: "right"
                            }, {
                                color: Ft.color,
                                size: Me,
                                family: qe,
                                weight: Ee
                            })) === null || $e === void 0 || $e.draw(t),
                            jt += Me + he
                        }),
                        x) {
                            var da = lt + wt + Qe + So;
                            Ao.forEach(function(gt) {
                                gt.forEach(function(Ge) {
                                    var $e, et, Ft = Ge.title, Sn = Ge.value;
                                    ($e = F.createFigure("text", {
                                        x: da,
                                        y: jt += ko,
                                        text: Ft.text
                                    }, {
                                        color: Ft.color,
                                        size: hn,
                                        family: hi,
                                        weight: ui
                                    })) === null || $e === void 0 || $e.draw(t),
                                    (et = F.createFigure("text", {
                                        x: lt + Dt - wt - Lo - Re,
                                        y: jt,
                                        text: Sn.text,
                                        align: "right"
                                    }, {
                                        color: Sn.color,
                                        size: hn,
                                        family: hi,
                                        weight: ui
                                    })) === null || et === void 0 || et.draw(t),
                                    jt += hn + Mo
                                })
                            })
                        }
                    }
                }
            }
            ,
            e.prototype._getCandleTooltipData = function(t, i, o, s, u, c, h) {
                var d, p, g, y = h.tooltip, f = y.text.color, x = [];
                if (S(y.custom))
                    ((p = (d = y.custom) === null || d === void 0 ? void 0 : d.call(y, t, h)) !== null && p !== void 0 ? p : []).forEach(function(M) {
                        var k = M.title
                          , E = M.value
                          , D = {
                            text: "",
                            color: ""
                        };
                        b(k) ? D = k : (D.text = k,
                        D.color = f),
                        D.text = Et(D.text, s);
                        var F = {
                            text: "",
                            color: ""
                        };
                        b(E) ? F = E : (F.text = E,
                        F.color = f),
                        x.push({
                            title: D,
                            value: F
                        })
                    });
                else {
                    var _ = i.price
                      , w = i.volume
                      , L = t.current;
                    x = [{
                        title: {
                            text: Et("time", s),
                            color: f
                        },
                        value: {
                            text: u.formatDate(o, L.timestamp, "YYYY-MM-DD HH:mm", a.FormatDateType.Tooltip),
                            color: f
                        }
                    }, {
                        title: {
                            text: Et("open", s),
                            color: f
                        },
                        value: {
                            text: Ce(G(L.open, _), c),
                            color: f
                        }
                    }, {
                        title: {
                            text: Et("high", s),
                            color: f
                        },
                        value: {
                            text: Ce(G(L.high, _), c),
                            color: f
                        }
                    }, {
                        title: {
                            text: Et("low", s),
                            color: f
                        },
                        value: {
                            text: Ce(G(L.low, _), c),
                            color: f
                        }
                    }, {
                        title: {
                            text: Et("close", s),
                            color: f
                        },
                        value: {
                            text: Ce(G(L.close, _), c),
                            color: f
                        }
                    }, {
                        title: {
                            text: Et("volume", s),
                            color: f
                        },
                        value: {
                            text: Ce(u.formatBigNumber(G((g = L.volume) !== null && g !== void 0 ? g : y.defaultValue, w)), c),
                            color: f
                        }
                    }]
                }
                return x
            }
            ,
            e
        }(go)
          , K1 = function(r) {
            function e(t, i) {
                var o = r.call(this, t, i) || this;
                return o._candleBarView = new po(o),
                o._candleAreaView = new V1(o),
                o._candleHighLowPriceView = new j1(o),
                o._candleLastPriceLineView = new W1(o),
                o.addChild(o._candleBarView),
                o
            }
            return ee(e, r),
            e.prototype.updateMainContent = function(t) {
                this.getPane().getChart().getStyles().candle.type !== a.CandleType.Area ? (this._candleBarView.draw(t),
                this._candleHighLowPriceView.draw(t),
                this._candleLastPriceLineView.draw(t)) : this._candleAreaView.draw(t)
            }
            ,
            e.prototype.createTooltipView = function() {
                return new Q1(this)
            }
            ,
            e
        }(fo)
          , yo = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.drawImp = function(t) {
                var i, o = this, s = this.getWidget(), u = s.getPane(), c = s.getBounding(), h = u.getAxisComponent(), d = this.getAxisStyles(u.getChart().getStyles());
                if (d.show) {
                    d.axisLine.show && ((i = this.createFigure("line", this.createAxisLine(c, d), d.axisLine)) === null || i === void 0 || i.draw(t));
                    var p = h.getTicks();
                    d.tickLine.show && this.createTickLines(p, c, d).forEach(function(g) {
                        var y;
                        (y = o.createFigure("line", g, d.tickLine)) === null || y === void 0 || y.draw(t)
                    }),
                    d.tickText.show && this.createTickTexts(p, c, d).forEach(function(g) {
                        var y;
                        (y = o.createFigure("text", g, d.tickText)) === null || y === void 0 || y.draw(t)
                    })
                }
            }
            ,
            e
        }(at)
          , Z1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.getAxisStyles = function(t) {
                return t.yAxis
            }
            ,
            e.prototype.createAxisLine = function(t, i) {
                var o, s = this.getWidget().getPane().getAxisComponent(), u = i.axisLine.size;
                return {
                    coordinates: [{
                        x: o = s.isFromZero() ? u / 2 : t.width - u,
                        y: 0
                    }, {
                        x: o,
                        y: t.height
                    }]
                }
            }
            ,
            e.prototype.createTickLines = function(t, i, o) {
                var s = this.getWidget().getPane().getAxisComponent()
                  , u = o.axisLine
                  , c = o.tickLine
                  , h = 0
                  , d = 0;
                return s.isFromZero() ? (h = 0,
                u.show && (h += u.size),
                d = h + c.length) : (h = i.width,
                u.show && (h -= u.size),
                d = h - c.length),
                t.map(function(p) {
                    return {
                        coordinates: [{
                            x: h,
                            y: p.coord
                        }, {
                            x: d,
                            y: p.coord
                        }]
                    }
                })
            }
            ,
            e.prototype.createTickTexts = function(t, i, o) {
                var s = this.getWidget().getPane().getAxisComponent()
                  , u = o.axisLine
                  , c = o.tickLine
                  , h = o.tickText
                  , d = 0;
                s.isFromZero() ? (d = h.marginStart,
                u.show && (d += u.size),
                c.show && (d += c.length)) : (d = i.width - h.marginEnd,
                u.show && (d -= u.size),
                c.show && (d -= c.length));
                var p = this.getWidget().getPane().getAxisComponent().isFromZero() ? "left" : "right";
                return t.map(function(g) {
                    return {
                        x: d,
                        y: g.coord,
                        text: g.text,
                        align: p,
                        baseline: "middle"
                    }
                })
            }
            ,
            e
        }(yo)
          , H1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.drawImp = function(t) {
                var i, o = this.getWidget(), s = o.getPane(), u = o.getBounding(), c = s.getChart().getChartStore(), h = c.getStyles().candle.priceMark, d = h.last, p = d.text;
                if (h.show && d.show && p.show) {
                    var g = c.getPrecision()
                      , y = s.getAxisComponent()
                      , f = c.getDataList()
                      , x = c.getVisibleDataList()
                      , _ = f[f.length - 1];
                    if (_ !== void 0) {
                        var w = _.close
                          , L = _.open
                          , M = y.convertToNicePixel(w)
                          , k = void 0;
                        k = w > L ? d.upColor : L > w ? d.downColor : d.noChangeColor;
                        var E = void 0;
                        if (y.getType() === a.YAxisType.Percentage) {
                            var D = x[0].data.close;
                            E = "".concat(((w - D) / D * 100).toFixed(2), "%")
                        } else
                            E = G(w, g.price);
                        E = Ce(E, c.getThousandsSeparator());
                        var F = void 0
                          , N = void 0;
                        y.isFromZero() ? (F = 0,
                        N = "left") : (F = u.width,
                        N = "right"),
                        (i = this.createFigure("rectText", {
                            x: F,
                            y: M,
                            text: E,
                            align: N,
                            baseline: "middle"
                        }, X(X({}, p), {
                            backgroundColor: k
                        }))) === null || i === void 0 || i.draw(t)
                    }
                }
            }
            ,
            e
        }(at)
          , U1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.drawImp = function(t) {
                var i = this
                  , o = this.getWidget()
                  , s = o.getPane()
                  , u = o.getBounding()
                  , c = s.getChart().getChartStore()
                  , h = c.getCustomApi()
                  , d = c.getStyles().indicator
                  , p = d.lastValueMark
                  , g = p.text;
                if (p.show) {
                    var y = s.getAxisComponent()
                      , f = c.getDataList()
                      , x = f.length - 1
                      , _ = c.getIndicatorStore().getInstances(s.getId())
                      , w = c.getThousandsSeparator();
                    _.forEach(function(L) {
                        var M = L.result[x];
                        if (M !== void 0 && L.visible) {
                            var k = L.precision;
                            $n(f, L, x, d, function(E, D) {
                                var F, N = M[E.key];
                                if (T(N)) {
                                    var O = y.convertToNicePixel(N)
                                      , z = G(N, k);
                                    L.shouldFormatBigNumber && (z = h.formatBigNumber(z)),
                                    z = Ce(z, w);
                                    var U = void 0
                                      , $ = void 0;
                                    y.isFromZero() ? (U = 0,
                                    $ = "left") : (U = u.width,
                                    $ = "right"),
                                    (F = i.createFigure("rectText", {
                                        x: U,
                                        y: O,
                                        text: z,
                                        align: $,
                                        baseline: "middle"
                                    }, X(X({}, g), {
                                        backgroundColor: D.color
                                    }))) === null || F === void 0 || F.draw(t)
                                }
                            })
                        }
                    })
                }
            }
            ,
            e
        }(at)
          , mo = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.coordinateToPointTimestampDataIndexFlag = function() {
                return !1
            }
            ,
            e.prototype.drawDefaultFigures = function(t, i, o, s, u, c, h, d, p, g, y, f, x) {
                this.drawFigures(t, i, this.getDefaultFigures(i, o, s, u, c, h, d, g, y, x), p)
            }
            ,
            e.prototype.getDefaultFigures = function(t, i, o, s, u, c, h, d, p, g) {
                var y, f, x = [];
                if (t.needDefaultYAxisFigure && t.id === ((y = g.instance) === null || y === void 0 ? void 0 : y.id) && g.paneId === this.getWidget().getPane().getId()) {
                    var _, w, L = Number.MAX_SAFE_INTEGER, M = Number.MIN_SAFE_INTEGER;
                    (f = p == null ? void 0 : p.isFromZero()) !== null && f !== void 0 && f ? (_ = "left",
                    w = 0) : (_ = "right",
                    w = o.width),
                    i.forEach(function(k, E) {
                        var D = t.points[E];
                        if (D.value !== void 0) {
                            L = Math.min(L, k.y),
                            M = Math.max(M, k.y);
                            var F = Ce(G(D.value, s.price), h);
                            x.push({
                                type: "rectText",
                                attrs: {
                                    x: w,
                                    y: k.y,
                                    text: F,
                                    align: _,
                                    baseline: "middle"
                                },
                                ignoreEvent: !0
                            })
                        }
                    }),
                    i.length > 1 && x.unshift({
                        type: "rect",
                        attrs: {
                            x: 0,
                            y: L,
                            width: o.width,
                            height: M - L
                        },
                        ignoreEvent: !0
                    })
                }
                return x
            }
            ,
            e.prototype.getFigures = function(t, i, o, s, u, c, h, d, p, g) {
                var y, f;
                return (f = (y = t.createYAxisFigures) === null || y === void 0 ? void 0 : y.call(t, {
                    overlay: t,
                    coordinates: i,
                    bounding: o,
                    barSpace: s,
                    precision: u,
                    thousandsSeparator: c,
                    dateTimeFormat: h,
                    defaultStyles: d,
                    xAxis: p,
                    yAxis: g
                })) !== null && f !== void 0 ? f : []
            }
            ,
            e
        }(vo)
          , Co = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.drawImp = function(t) {
                var i, o = this.getWidget(), s = o.getPane(), u = o.getBounding(), c = o.getPane().getChart().getChartStore(), h = c.getCrosshairStore().get(), d = c.getStyles().crosshair;
                if (h.paneId !== void 0 && this.compare(h, s.getId()) && d.show) {
                    var p = this.getDirectionStyles(d)
                      , g = p.text;
                    if (p.show && g.show) {
                        var y = s.getAxisComponent()
                          , f = this.getText(h, c, y);
                        t.font = Q(g.size, g.weight, g.family),
                        (i = this.createFigure("rectText", this.getTextAttrs(f, t.measureText(f).width, h, u, y, g), g)) === null || i === void 0 || i.draw(t)
                    }
                }
            }
            ,
            e.prototype.compare = function(t, i) {
                return t.paneId === i
            }
            ,
            e.prototype.getDirectionStyles = function(t) {
                return t.horizontal
            }
            ,
            e.prototype.getText = function(t, i, o) {
                var s, u, c, h = o, d = o.convertFromPixel(t.y);
                if (h.getType() === a.YAxisType.Percentage) {
                    var p = (u = (s = i.getVisibleDataList()[0]) === null || s === void 0 ? void 0 : s.data) !== null && u !== void 0 ? u : {};
                    c = "".concat(((d - p.close) / p.close * 100).toFixed(2), "%")
                } else {
                    var g = i.getIndicatorStore().getInstances(t.paneId)
                      , y = 0
                      , f = !1;
                    h.isInCandle() ? y = i.getPrecision().price : g.forEach(function(x) {
                        y = Math.max(x.precision, y),
                        f || (f = x.shouldFormatBigNumber)
                    }),
                    c = G(d, y),
                    f && (c = i.getCustomApi().formatBigNumber(c))
                }
                return Ce(c, i.getThousandsSeparator())
            }
            ,
            e.prototype.getTextAttrs = function(t, i, o, s, u, c) {
                var h, d;
                return u.isFromZero() ? (h = 0,
                d = "left") : (h = s.width,
                d = "right"),
                {
                    x: h,
                    y: o.y,
                    text: t,
                    align: d,
                    baseline: "middle"
                }
            }
            ,
            e
        }(at)
          , X1 = function(r) {
            function e(t, i) {
                var o = r.call(this, t, i) || this;
                return o._yAxisView = new Z1(o),
                o._candleLastPriceLabelView = new H1(o),
                o._indicatorLastValueView = new U1(o),
                o._overlayYAxisView = new mo(o),
                o._crosshairHorizontalLabelView = new Co(o),
                o.getContainer().style.cursor = "ns-resize",
                o.addChild(o._overlayYAxisView),
                o
            }
            return ee(e, r),
            e.prototype.getName = function() {
                return rt
            }
            ,
            e.prototype.updateMain = function(t) {
                this._yAxisView.draw(t),
                this.getPane().getAxisComponent().isInCandle() && this._candleLastPriceLabelView.draw(t),
                this._indicatorLastValueView.draw(t)
            }
            ,
            e.prototype.updateOverlay = function(t) {
                this._overlayYAxisView.draw(t),
                this._crosshairHorizontalLabelView.draw(t)
            }
            ,
            e
        }(ii)
          , xo = function() {
            function r(e) {
                this._extremum = {
                    min: 0,
                    max: 0,
                    range: 0,
                    realMin: 0,
                    realMax: 0,
                    realRange: 0
                },
                this._prevExtremum = {
                    min: 0,
                    max: 0,
                    range: 0,
                    realMin: 0,
                    realMax: 0,
                    realRange: 0
                },
                this._ticks = [],
                this._autoCalcTickFlag = !0,
                this._parent = e
            }
            return r.prototype.getParent = function() {
                return this._parent
            }
            ,
            r.prototype.buildTicks = function(e) {
                return this._autoCalcTickFlag && (this._extremum = this.calcExtremum()),
                !(this._prevExtremum.min === this._extremum.min && this._prevExtremum.max === this._extremum.max && !e) && (this._prevExtremum = this._extremum,
                this._ticks = this.optimalTicks(this._calcTicks()),
                !0)
            }
            ,
            r.prototype.getTicks = function() {
                return this._ticks
            }
            ,
            r.prototype.setExtremum = function(e) {
                this._autoCalcTickFlag = !1,
                this._extremum = e
            }
            ,
            r.prototype.getExtremum = function() {
                return this._extremum
            }
            ,
            r.prototype.setAutoCalcTickFlag = function(e) {
                this._autoCalcTickFlag = e
            }
            ,
            r.prototype.getAutoCalcTickFlag = function() {
                return this._autoCalcTickFlag
            }
            ,
            r.prototype._calcTicks = function() {
                var e = this._extremum
                  , t = e.realMin
                  , i = e.realMax
                  , o = e.realRange
                  , s = [];
                if (o >= 0) {
                    var u = q(this._calcTickInterval(o), 2)
                      , c = u[0]
                      , h = u[1]
                      , d = it(Math.ceil(t / c) * c, h)
                      , p = it(Math.floor(i / c) * c, h)
                      , g = 0
                      , y = d;
                    if (c !== 0)
                        for (; p >= y; ) {
                            var f = y.toFixed(h);
                            s[g] = {
                                text: f,
                                coord: 0,
                                value: f
                            },
                            ++g,
                            y += c
                        }
                }
                return s
            }
            ,
            r.prototype._calcTickInterval = function(e) {
                var t, i, o, s, u = (i = Math.floor(xt(t = e / 8)),
                o = Tt(i),
                t = (1.5 > (s = t / o) ? 1 : 2.5 > s ? 2 : 3.5 > s ? 3 : 4.5 > s ? 4 : 5.5 > s ? 5 : 6.5 > s ? 6 : 8) * o,
                -20 > i ? t : +t.toFixed(0 > i ? -i : 0)), c = function(h) {
                    var d = "" + h
                      , p = d.indexOf("e");
                    if (p > 0) {
                        var g = +d.slice(p + 1);
                        return 0 > g ? -g : 0
                    }
                    var y = d.indexOf(".");
                    return 0 > y ? 0 : d.length - 1 - y
                }(u);
                return [u, c]
            }
            ,
            r
        }()
          , G1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.calcExtremum = function() {
                var t, i, o, s, u, c = this.getParent(), h = c.getChart(), d = h.getChartStore(), p = Number.MAX_SAFE_INTEGER, g = Number.MIN_SAFE_INTEGER, y = [], f = !1, x = Number.MAX_SAFE_INTEGER, _ = Number.MIN_SAFE_INTEGER, w = Number.MAX_SAFE_INTEGER;
                d.getIndicatorStore().getInstances(c.getId()).forEach(function(Ne) {
                    var Qe, Re, Ue;
                    f || (f = (Qe = Ne.shouldOhlc) !== null && Qe !== void 0 && Qe),
                    w = Math.min(w, Ne.precision),
                    Ne.minValue !== null && (x = Math.min(x, Ne.minValue)),
                    Ne.maxValue !== null && (_ = Math.max(_, Ne.maxValue)),
                    y.push({
                        figures: (Re = Ne.figures) !== null && Re !== void 0 ? Re : [],
                        result: (Ue = Ne.result) !== null && Ue !== void 0 ? Ue : []
                    })
                });
                var L = 4
                  , M = this.isInCandle();
                if (M) {
                    var k = d.getPrecision().price;
                    L = w !== Number.MAX_SAFE_INTEGER ? Math.min(w, k) : k
                } else
                    w !== Number.MAX_SAFE_INTEGER && (L = w);
                var E = d.getVisibleDataList()
                  , D = h.getStyles().candle
                  , F = D.type === a.CandleType.Area
                  , N = D.area.value
                  , O = M && !F || !M && f;
                E.forEach(function(Ne) {
                    var Qe = Ne.dataIndex
                      , Re = Ne.data;
                    if (O && (p = Math.min(p, Re.low),
                    g = Math.max(g, Re.high)),
                    M && F) {
                        var Ue = Re[N];
                        p = Math.min(p, Ue),
                        g = Math.max(g, Ue)
                    }
                    y.forEach(function(_t) {
                        var st, It = (st = _t.result[Qe]) !== null && st !== void 0 ? st : {};
                        _t.figures.forEach(function(bt) {
                            var Xe = It[bt.key];
                            T(Xe) && (p = Math.min(p, Xe),
                            g = Math.max(g, Xe))
                        })
                    })
                }),
                p !== Number.MAX_SAFE_INTEGER && g !== Number.MIN_SAFE_INTEGER ? (p = Math.min(x, p),
                g = Math.max(_, g)) : (p = 0,
                g = 10);
                var z, U = this.getType();
                switch (U) {
                case a.YAxisType.Percentage:
                    var $ = (t = E[0]) === null || t === void 0 ? void 0 : t.data;
                    ($ == null ? void 0 : $.close) !== void 0 && (p = (p - $.close) / $.close * 100,
                    g = (g - $.close) / $.close * 100),
                    z = .01;
                    break;
                case a.YAxisType.Log:
                    p = xt(p),
                    g = xt(g),
                    z = .05 * Tt(-L);
                    break;
                default:
                    z = Tt(-L)
                }
                if (p === g || z > Math.abs(p - g)) {
                    var se = x === p
                      , te = _ === g;
                    p = se ? p : te ? p - 8 * z : p - 4 * z,
                    g = te ? g : se ? g + 8 * z : g + 4 * z
                }
                var ne = (o = (i = this.getParent().getYAxisWidget()) === null || i === void 0 ? void 0 : i.getBounding().height) !== null && o !== void 0 ? o : 0
                  , ye = c.getOptions().gap
                  , Se = (s = ye == null ? void 0 : ye.top) !== null && s !== void 0 ? s : .2;
                1 > Se || (Se /= ne);
                var he = (u = ye == null ? void 0 : ye.bottom) !== null && u !== void 0 ? u : .1;
                1 > he || (he /= ne);
                var Me, Ee, qe, ke = Math.abs(g - p);
                return ke = Math.abs((g += ke * Se) - (p -= ke * he)),
                U === a.YAxisType.Log ? (Me = Tt(p),
                Ee = Tt(g),
                qe = Math.abs(Ee - Me)) : (Me = p,
                Ee = g,
                qe = ke),
                {
                    min: p,
                    max: g,
                    range: ke,
                    realMin: Me,
                    realMax: Ee,
                    realRange: qe
                }
            }
            ,
            e.prototype._innerConvertToPixel = function(t) {
                var i, o, s = (o = (i = this.getParent().getYAxisWidget()) === null || i === void 0 ? void 0 : i.getBounding().height) !== null && o !== void 0 ? o : 0, u = this.getExtremum(), c = (t - u.min) / u.range;
                return this.isReverse() ? Math.round(c * s) : Math.round((1 - c) * s)
            }
            ,
            e.prototype.isInCandle = function() {
                return this.getParent().getName() === "candle"
            }
            ,
            e.prototype.getType = function() {
                return this.isInCandle() ? this.getParent().getChart().getStyles().yAxis.type : a.YAxisType.Normal
            }
            ,
            e.prototype.getPosition = function() {
                return this.getParent().getChart().getStyles().yAxis.position
            }
            ,
            e.prototype.isReverse = function() {
                return !!this.isInCandle() && this.getParent().getChart().getStyles().yAxis.reverse
            }
            ,
            e.prototype.isFromZero = function() {
                var t = this.getParent().getChart().getStyles().yAxis
                  , i = t.inside;
                return t.position === a.YAxisPosition.Left && i || t.position === a.YAxisPosition.Right && !i
            }
            ,
            e.prototype.optimalTicks = function(t) {
                var i, o, s = this, u = this.getParent(), c = (o = (i = u.getYAxisWidget()) === null || i === void 0 ? void 0 : i.getBounding().height) !== null && o !== void 0 ? o : 0, h = u.getChart().getChartStore(), d = h.getCustomApi(), p = [], g = this.getType(), y = h.getIndicatorStore().getInstances(u.getId()), f = h.getThousandsSeparator(), x = 0, _ = !1;
                this.isInCandle() ? x = h.getPrecision().price : y.forEach(function(M) {
                    x = Math.max(x, M.precision),
                    _ || (_ = M.shouldFormatBigNumber)
                });
                var w, L = h.getStyles().xAxis.tickText.size;
                return t.forEach(function(M) {
                    var k, E = M.value, D = s._innerConvertToPixel(+E);
                    switch (g) {
                    case a.YAxisType.Percentage:
                        k = "".concat(G(E, 2), "%");
                        break;
                    case a.YAxisType.Log:
                        D = s._innerConvertToPixel(xt(+E)),
                        k = G(E, x);
                        break;
                    default:
                        k = G(E, x),
                        _ && (k = d.formatBigNumber(E))
                    }
                    k = Ce(k, f),
                    D > L && c - L > D && (w !== void 0 && Math.abs(w - D) > 2 * L || w === void 0) && (p.push({
                        text: k,
                        coord: D,
                        value: E
                    }),
                    w = D)
                }),
                p
            }
            ,
            e.prototype.getAutoSize = function() {
                var t = this.getParent()
                  , i = t.getChart()
                  , o = i.getStyles()
                  , s = o.yAxis
                  , u = s.size;
                if (u !== "auto")
                    return u;
                var c = i.getChartStore()
                  , h = c.getCustomApi()
                  , d = 0;
                if (s.show && (s.axisLine.show && (d += s.axisLine.size),
                s.tickLine.show && (d += s.tickLine.length),
                s.tickText.show)) {
                    var p = 0;
                    this.getTicks().forEach(function(E) {
                        p = Math.max(p, xe(E.text, s.tickText.size, s.tickText.weight, s.tickText.family))
                    }),
                    d += s.tickText.marginStart + s.tickText.marginEnd + p
                }
                var g = o.crosshair
                  , y = 0;
                if (g.show && g.horizontal.show && g.horizontal.text.show) {
                    var f = c.getIndicatorStore().getInstances(t.getId())
                      , x = 0
                      , _ = !1;
                    f.forEach(function(E) {
                        x = Math.max(E.precision, x),
                        _ || (_ = E.shouldFormatBigNumber)
                    });
                    var w = 2;
                    if (this.getType() !== a.YAxisType.Percentage)
                        if (this.isInCandle()) {
                            var L = c.getPrecision().price
                              , M = o.indicator.lastValueMark;
                            w = M.show && M.text.show ? Math.max(x, L) : L
                        } else
                            w = x;
                    var k = G(this.getExtremum().max, w);
                    _ && (k = h.formatBigNumber(k)),
                    y += g.horizontal.text.paddingLeft + g.horizontal.text.paddingRight + 2 * g.horizontal.text.borderSize + xe(k, g.horizontal.text.size, g.horizontal.text.weight, g.horizontal.text.family)
                }
                return Math.max(d, y)
            }
            ,
            e.prototype.convertFromPixel = function(t) {
                var i, o, s, u = (o = (i = this.getParent().getYAxisWidget()) === null || i === void 0 ? void 0 : i.getBounding().height) !== null && o !== void 0 ? o : 0, c = this.getExtremum(), h = c.min, d = c.range, p = (this.isReverse() ? t / u : 1 - t / u) * d + h;
                switch (this.getType()) {
                case a.YAxisType.Percentage:
                    var g = (s = this.getParent().getChart().getChartStore().getVisibleDataList()[0]) === null || s === void 0 ? void 0 : s.data;
                    return (g == null ? void 0 : g.close) !== void 0 ? g.close * p / 100 + g.close : 0;
                case a.YAxisType.Log:
                    return Tt(p);
                default:
                    return p
                }
            }
            ,
            e.prototype.convertToRealValue = function(t) {
                var i = t;
                return this.getType() === a.YAxisType.Log && (i = Tt(t)),
                i
            }
            ,
            e.prototype.convertToPixel = function(t) {
                var i, o = t;
                switch (this.getType()) {
                case a.YAxisType.Percentage:
                    var s = (i = this.getParent().getChart().getChartStore().getVisibleDataList()[0]) === null || i === void 0 ? void 0 : i.data;
                    (s == null ? void 0 : s.close) !== void 0 && (o = (t - s.close) / s.close * 100);
                    break;
                case a.YAxisType.Log:
                    o = xt(t);
                    break;
                default:
                    o = t
                }
                return this._innerConvertToPixel(o)
            }
            ,
            e.prototype.convertToNicePixel = function(t) {
                var i, o, s = (o = (i = this.getParent().getYAxisWidget()) === null || i === void 0 ? void 0 : i.getBounding().height) !== null && o !== void 0 ? o : 0, u = this.convertToPixel(t);
                return Math.round(Math.max(.05 * s, Math.min(u, .98 * s)))
            }
            ,
            e
        }(xo)
          , _o = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.getName = function() {
                return "indicator"
            }
            ,
            e.prototype.createAxisComponent = function() {
                return new G1(this)
            }
            ,
            e.prototype.createMainWidget = function(t) {
                return new fo(t,this)
            }
            ,
            e.prototype.createSeparatorWidget = function(t) {
                return new M1(t,this)
            }
            ,
            e.prototype.creatYAxisWidget = function(t) {
                return new X1(t,this)
            }
            ,
            e
        }(qi)
          , $1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.getName = function() {
                return "candle"
            }
            ,
            e.prototype.createMainWidget = function(t) {
                return new K1(t,this)
            }
            ,
            e.prototype.createSeparatorWidget = function() {
                return null
            }
            ,
            e
        }(_o)
          , J1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.getAxisStyles = function(t) {
                return t.xAxis
            }
            ,
            e.prototype.createAxisLine = function(t, i) {
                var o = i.axisLine.size / 2;
                return {
                    coordinates: [{
                        x: 0,
                        y: o
                    }, {
                        x: t.width,
                        y: o
                    }]
                }
            }
            ,
            e.prototype.createTickLines = function(t, i, o) {
                var s = o.tickLine
                  , u = o.axisLine.size;
                return t.map(function(c) {
                    return {
                        coordinates: [{
                            x: c.coord,
                            y: 0
                        }, {
                            x: c.coord,
                            y: u + s.length
                        }]
                    }
                })
            }
            ,
            e.prototype.createTickTexts = function(t, i, o) {
                var s = o.tickText
                  , u = o.axisLine.size
                  , c = o.tickLine.length;
                return t.map(function(h) {
                    return {
                        x: h.coord,
                        y: u + c + s.marginStart,
                        text: h.text,
                        align: "center",
                        baseline: "top"
                    }
                })
            }
            ,
            e
        }(yo)
          , q1 = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.coordinateToPointTimestampDataIndexFlag = function() {
                return !0
            }
            ,
            e.prototype.coordinateToPointValueFlag = function() {
                return !1
            }
            ,
            e.prototype.getCompleteOverlays = function(t) {
                return t.getInstances()
            }
            ,
            e.prototype.getProgressOverlay = function(t) {
                return t.instance
            }
            ,
            e.prototype.getDefaultFigures = function(t, i, o, s, u, c, h, d, p, g) {
                var y, f = [];
                if (t.needDefaultXAxisFigure && t.id === ((y = g.instance) === null || y === void 0 ? void 0 : y.id)) {
                    var x = Number.MAX_SAFE_INTEGER
                      , _ = Number.MIN_SAFE_INTEGER;
                    i.forEach(function(w, L) {
                        x = Math.min(x, w.x),
                        _ = Math.max(_, w.x);
                        var M = t.points[L];
                        if (M.timestamp !== void 0) {
                            var k = c.formatDate(u, M.timestamp, "YYYY-MM-DD HH:mm", a.FormatDateType.Crosshair);
                            f.push({
                                type: "rectText",
                                attrs: {
                                    x: w.x,
                                    y: 0,
                                    text: k,
                                    align: "center"
                                },
                                ignoreEvent: !0
                            })
                        }
                    }),
                    i.length > 1 && f.unshift({
                        type: "rect",
                        attrs: {
                            x,
                            y: 0,
                            width: _ - x,
                            height: o.height
                        },
                        ignoreEvent: !0
                    })
                }
                return f
            }
            ,
            e.prototype.getFigures = function(t, i, o, s, u, c, h, d, p, g) {
                var y, f;
                return (f = (y = t.createXAxisFigures) === null || y === void 0 ? void 0 : y.call(t, {
                    overlay: t,
                    coordinates: i,
                    bounding: o,
                    barSpace: s,
                    precision: u,
                    thousandsSeparator: c,
                    dateTimeFormat: h,
                    defaultStyles: d,
                    xAxis: p,
                    yAxis: g
                })) !== null && f !== void 0 ? f : []
            }
            ,
            e
        }(mo)
          , ea = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.compare = function(t) {
                return t.kLineData !== void 0 && t.dataIndex === t.realDataIndex
            }
            ,
            e.prototype.getDirectionStyles = function(t) {
                return t.vertical
            }
            ,
            e.prototype.getText = function(t, i) {
                var o, s = (o = t.kLineData) === null || o === void 0 ? void 0 : o.timestamp;
                return i.getCustomApi().formatDate(i.getTimeScaleStore().getDateTimeFormat(), s, "YYYY-MM-DD HH:mm", a.FormatDateType.Crosshair)
            }
            ,
            e.prototype.getTextAttrs = function(t, i, o, s, u, c) {
                var h = o.realX;
                return {
                    x: 0 > h - i / 2 - c.paddingLeft ? c.paddingLeft + i / 2 : h + i / 2 + c.paddingRight > s.width ? s.width - c.paddingRight - i / 2 : h,
                    y: 0,
                    text: t,
                    align: "center",
                    baseline: "top"
                }
            }
            ,
            e
        }(Co)
          , ta = function(r) {
            function e(t, i) {
                var o = r.call(this, t, i) || this;
                return o._xAxisView = new J1(o),
                o._overlayXAxisView = new q1(o),
                o._crosshairVerticalLabelView = new ea(o),
                o.getContainer().style.cursor = "ew-resize",
                o.addChild(o._overlayXAxisView),
                o
            }
            return ee(e, r),
            e.prototype.getName = function() {
                return ot
            }
            ,
            e.prototype.updateMain = function(t) {
                this._xAxisView.draw(t)
            }
            ,
            e.prototype.updateOverlay = function(t) {
                this._overlayXAxisView.draw(t),
                this._crosshairVerticalLabelView.draw(t)
            }
            ,
            e
        }(ii)
          , na = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.calcExtremum = function() {
                var t = this.getParent().getChart().getChartStore().getTimeScaleStore().getVisibleRange()
                  , i = t.from
                  , o = t.to
                  , s = o - 1
                  , u = o - i;
                return {
                    min: i,
                    max: s,
                    range: u,
                    realMin: i,
                    realMax: s,
                    realRange: u
                }
            }
            ,
            e.prototype.optimalTicks = function(t) {
                var i, o, s = this.getParent().getChart(), u = s.getChartStore(), c = u.getCustomApi().formatDate, h = [], d = t.length, p = u.getDataList();
                if (d > 0) {
                    var g = u.getTimeScaleStore().getDateTimeFormat()
                      , y = s.getStyles().xAxis.tickText
                      , f = xe("00-00 00:00", y.size, y.weight, y.family)
                      , x = this.convertToPixel(parseInt(t[0].value, 10))
                      , _ = 1;
                    if (d > 1) {
                        var w = this.convertToPixel(parseInt(t[1].value, 10))
                          , L = Math.abs(w - x);
                        f > L && (_ = Math.ceil(f / L))
                    }
                    for (var M = 0; d > M; M += _) {
                        var k = parseInt(t[M].value, 10)
                          , E = p[k].timestamp
                          , D = c(g, E, "HH:mm", a.FormatDateType.XAxis);
                        M !== 0 && (D = (i = this._optimalTickLabel(c, g, E, p[parseInt(t[M - _].value, 10)].timestamp)) !== null && i !== void 0 ? i : D);
                        var F = this.convertToPixel(k);
                        h.push({
                            text: D,
                            coord: F,
                            value: E
                        })
                    }
                    if (h.length === 1)
                        h[0].text = c(g, h[0].value, "YYYY-MM-DD HH:mm", a.FormatDateType.XAxis);
                    else {
                        var N = h[0].value
                          , O = h[1].value;
                        if (h[2] !== void 0) {
                            var z = h[2].text;
                            /^[0-9]{2}-[0-9]{2}$/.test(z) ? h[0].text = c(g, N, "MM-DD", a.FormatDateType.XAxis) : /^[0-9]{4}-[0-9]{2}$/.test(z) ? h[0].text = c(g, N, "YYYY-MM", a.FormatDateType.XAxis) : /^[0-9]{4}$/.test(z) && (h[0].text = c(g, N, "YYYY", a.FormatDateType.XAxis))
                        } else
                            h[0].text = (o = this._optimalTickLabel(c, g, N, O)) !== null && o !== void 0 ? o : h[0].text
                    }
                }
                return h
            }
            ,
            e.prototype._optimalTickLabel = function(t, i, o, s) {
                var u = t(i, o, "YYYY", a.FormatDateType.XAxis)
                  , c = t(i, o, "YYYY-MM", a.FormatDateType.XAxis)
                  , h = t(i, o, "MM-DD", a.FormatDateType.XAxis);
                return u !== t(i, s, "YYYY", a.FormatDateType.XAxis) ? u : c !== t(i, s, "YYYY-MM", a.FormatDateType.XAxis) ? c : h !== t(i, s, "MM-DD", a.FormatDateType.XAxis) ? h : null
            }
            ,
            e.prototype.getAutoSize = function() {
                var t = this.getParent().getChart().getStyles()
                  , i = t.xAxis
                  , o = i.size;
                if (o !== "auto")
                    return o;
                var s = t.crosshair
                  , u = 0;
                i.show && (i.axisLine.show && (u += i.axisLine.size),
                i.tickLine.show && (u += i.tickLine.length),
                i.tickText.show && (u += i.tickText.marginStart + i.tickText.marginEnd + i.tickText.size));
                var c = 0;
                return s.show && s.vertical.show && s.vertical.text.show && (c += s.vertical.text.paddingTop + s.vertical.text.paddingBottom + 2 * s.vertical.text.borderSize + s.vertical.text.size),
                Math.max(u, c)
            }
            ,
            e.prototype.convertFromPixel = function(t) {
                return this.getParent().getChart().getChartStore().getTimeScaleStore().coordinateToDataIndex(t)
            }
            ,
            e.prototype.convertToPixel = function(t) {
                return this.getParent().getChart().getChartStore().getTimeScaleStore().dataIndexToCoordinate(t)
            }
            ,
            e
        }(xo)
          , ia = function(r) {
            function e() {
                return r !== null && r.apply(this, arguments) || this
            }
            return ee(e, r),
            e.prototype.getName = function() {
                return "xAxis"
            }
            ,
            e.prototype.createAxisComponent = function() {
                return new na(this)
            }
            ,
            e.prototype.createMainWidget = function(t) {
                return new ta(t,this)
            }
            ,
            e
        }(qi);
        function bo() {
            var r;
            return typeof window < "u" && ((r = window.navigator.userAgent.toLowerCase().indexOf("firefox")) !== null && r !== void 0 ? r : -1) > -1
        }
        function li() {
            return typeof window < "u" && /iPhone|iPad|iPod/.test(window.navigator.platform)
        }
        var ci, oa = function() {
            function r(e, t, i) {
                var o = this;
                this._clickCount = 0,
                this._clickTimeoutId = null,
                this._clickCoordinate = {
                    x: -1 / 0,
                    y: 1 / 0
                },
                this._tapCount = 0,
                this._tapTimeoutId = null,
                this._tapCoordinate = {
                    x: -1 / 0,
                    y: 1 / 0
                },
                this._longTapTimeoutId = null,
                this._longTapActive = !1,
                this._mouseMoveStartCoordinate = null,
                this._touchMoveStartCoordinate = null,
                this._touchMoveExceededManhattanDistance = !1,
                this._cancelClick = !1,
                this._cancelTap = !1,
                this._unsubscribeOutsideMouseEvents = null,
                this._unsubscribeOutsideTouchEvents = null,
                this._unsubscribeMobileSafariEvents = null,
                this._unsubscribeMousemove = null,
                this._unsubscribeMouseWheel = null,
                this._unsubscribeContextMenu = null,
                this._unsubscribeRootMouseEvents = null,
                this._unsubscribeRootTouchEvents = null,
                this._startPinchMiddleCoordinate = null,
                this._startPinchDistance = 0,
                this._pinchPrevented = !1,
                this._preventTouchDragProcess = !1,
                this._mousePressed = !1,
                this._lastTouchEventTimeStamp = 0,
                this._activeTouchId = null,
                this._acceptMouseLeave = !li(),
                this._onFirefoxOutsideMouseUp = function(s) {
                    o._mouseUpHandler(s)
                }
                ,
                this._onMobileSafariDoubleClick = function(s) {
                    o._firesTouchEvents(s) ? (++o._tapCount,
                    o._tapTimeoutId !== null && o._tapCount > 1 && (30 > o._mouseTouchMoveWithDownInfo(o._getCoordinate(s), o._tapCoordinate).manhattanDistance && !o._cancelTap && o._processEvent(o._makeCompatEvent(s), o._handler.doubleTapEvent),
                    o._resetTapTimeout())) : (++o._clickCount,
                    o._clickTimeoutId !== null && o._clickCount > 1 && (5 > o._mouseTouchMoveWithDownInfo(o._getCoordinate(s), o._clickCoordinate).manhattanDistance && !o._cancelClick && o._processEvent(o._makeCompatEvent(s), o._handler.mouseDoubleClickEvent),
                    o._resetClickTimeout()))
                }
                ,
                this._target = e,
                this._handler = t,
                this._options = i,
                this._init()
            }
            return r.prototype.destroy = function() {
                this._unsubscribeOutsideMouseEvents !== null && (this._unsubscribeOutsideMouseEvents(),
                this._unsubscribeOutsideMouseEvents = null),
                this._unsubscribeOutsideTouchEvents !== null && (this._unsubscribeOutsideTouchEvents(),
                this._unsubscribeOutsideTouchEvents = null),
                this._unsubscribeMousemove !== null && (this._unsubscribeMousemove(),
                this._unsubscribeMousemove = null),
                this._unsubscribeMouseWheel !== null && (this._unsubscribeMouseWheel(),
                this._unsubscribeMouseWheel = null),
                this._unsubscribeContextMenu !== null && (this._unsubscribeContextMenu(),
                this._unsubscribeContextMenu = null),
                this._unsubscribeRootMouseEvents !== null && (this._unsubscribeRootMouseEvents(),
                this._unsubscribeRootMouseEvents = null),
                this._unsubscribeRootTouchEvents !== null && (this._unsubscribeRootTouchEvents(),
                this._unsubscribeRootTouchEvents = null),
                this._unsubscribeMobileSafariEvents !== null && (this._unsubscribeMobileSafariEvents(),
                this._unsubscribeMobileSafariEvents = null),
                this._clearLongTapTimeout(),
                this._resetClickTimeout()
            }
            ,
            r.prototype._mouseEnterHandler = function(e) {
                var t, i, o, s = this;
                (t = this._unsubscribeMousemove) === null || t === void 0 || t.call(this),
                (i = this._unsubscribeMouseWheel) === null || i === void 0 || i.call(this),
                (o = this._unsubscribeContextMenu) === null || o === void 0 || o.call(this);
                var u = this._mouseMoveHandler.bind(this);
                this._unsubscribeMousemove = function() {
                    s._target.removeEventListener("mousemove", u)
                }
                ,
                this._target.addEventListener("mousemove", u);
                var c = this._mouseWheelHandler.bind(this);
                this._unsubscribeMouseWheel = function() {
                    s._target.removeEventListener("wheel", c)
                }
                ,
                this._target.addEventListener("wheel", c, {
                    passive: !1
                });
                var h = this._contextMenuHandler.bind(this);
                this._unsubscribeContextMenu = function() {
                    s._target.removeEventListener("contextmenu", h)
                }
                ,
                this._target.addEventListener("contextmenu", h, {
                    passive: !1
                }),
                this._firesTouchEvents(e) || (this._processEvent(this._makeCompatEvent(e), this._handler.mouseEnterEvent),
                this._acceptMouseLeave = !0)
            }
            ,
            r.prototype._resetClickTimeout = function() {
                this._clickTimeoutId !== null && clearTimeout(this._clickTimeoutId),
                this._clickCount = 0,
                this._clickTimeoutId = null,
                this._clickCoordinate = {
                    x: -1 / 0,
                    y: 1 / 0
                }
            }
            ,
            r.prototype._resetTapTimeout = function() {
                this._tapTimeoutId !== null && clearTimeout(this._tapTimeoutId),
                this._tapCount = 0,
                this._tapTimeoutId = null,
                this._tapCoordinate = {
                    x: -1 / 0,
                    y: 1 / 0
                }
            }
            ,
            r.prototype._mouseMoveHandler = function(e) {
                this._mousePressed || this._touchMoveStartCoordinate !== null || this._firesTouchEvents(e) || (this._processEvent(this._makeCompatEvent(e), this._handler.mouseMoveEvent),
                this._acceptMouseLeave = !0)
            }
            ,
            r.prototype._mouseWheelHandler = function(e) {
                if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) {
                    if (this._handler.mouseWheelHortEvent === void 0 || (this._preventDefault(e),
                    Math.abs(e.deltaX) === 0))
                        return;
                    this._handler.mouseWheelHortEvent(this._makeCompatEvent(e), -e.deltaX)
                } else {
                    if (this._handler.mouseWheelVertEvent === void 0)
                        return;
                    var t = -e.deltaY / 100;
                    if (t === 0)
                        return;
                    switch (this._preventDefault(e),
                    e.deltaMode) {
                    case e.DOM_DELTA_PAGE:
                        t *= 120;
                        break;
                    case e.DOM_DELTA_LINE:
                        t *= 32
                    }
                    if (t !== 0) {
                        var i = Math.sign(t) * Math.min(1, Math.abs(t));
                        this._handler.mouseWheelVertEvent(this._makeCompatEvent(e), i)
                    }
                }
            }
            ,
            r.prototype._contextMenuHandler = function(e) {
                this._preventDefault(e)
            }
            ,
            r.prototype._touchMoveHandler = function(e) {
                var t = this._touchWithId(e.changedTouches, this._activeTouchId);
                if (t !== null && (this._lastTouchEventTimeStamp = this._eventTimeStamp(e),
                this._startPinchMiddleCoordinate === null && !this._preventTouchDragProcess)) {
                    this._pinchPrevented = !0;
                    var i = this._mouseTouchMoveWithDownInfo(this._getCoordinate(t), this._touchMoveStartCoordinate)
                      , o = i.yOffset;
                    if (this._touchMoveExceededManhattanDistance || i.manhattanDistance >= 5) {
                        if (!this._touchMoveExceededManhattanDistance) {
                            var s = .5 * i.xOffset
                              , u = o >= s && !this._options.treatVertDragAsPageScroll()
                              , c = s > o && !this._options.treatHorzDragAsPageScroll();
                            u || c || (this._preventTouchDragProcess = !0),
                            this._touchMoveExceededManhattanDistance = !0,
                            this._cancelTap = !0,
                            this._clearLongTapTimeout(),
                            this._resetTapTimeout()
                        }
                        this._preventTouchDragProcess || this._processEvent(this._makeCompatEvent(e, t), this._handler.touchMoveEvent)
                    }
                }
            }
            ,
            r.prototype._mouseMoveWithDownHandler = function(e) {
                e.button === 0 && (5 > this._mouseTouchMoveWithDownInfo(this._getCoordinate(e), this._mouseMoveStartCoordinate).manhattanDistance || (this._cancelClick = !0,
                this._resetClickTimeout()),
                this._cancelClick && this._processEvent(this._makeCompatEvent(e), this._handler.pressedMouseMoveEvent))
            }
            ,
            r.prototype._mouseTouchMoveWithDownInfo = function(e, t) {
                var i = Math.abs(t.x - e.x)
                  , o = Math.abs(t.y - e.y);
                return {
                    xOffset: i,
                    yOffset: o,
                    manhattanDistance: i + o
                }
            }
            ,
            r.prototype._touchEndHandler = function(e) {
                var t = this._touchWithId(e.changedTouches, this._activeTouchId);
                if (t === null && e.touches.length === 0 && (t = e.changedTouches[0]),
                t !== null) {
                    this._activeTouchId = null,
                    this._lastTouchEventTimeStamp = this._eventTimeStamp(e),
                    this._clearLongTapTimeout(),
                    this._touchMoveStartCoordinate = null,
                    this._unsubscribeRootTouchEvents !== null && (this._unsubscribeRootTouchEvents(),
                    this._unsubscribeRootTouchEvents = null);
                    var i = this._makeCompatEvent(e, t);
                    this._processEvent(i, this._handler.touchEndEvent),
                    ++this._tapCount,
                    this._tapTimeoutId !== null && this._tapCount > 1 ? (30 > this._mouseTouchMoveWithDownInfo(this._getCoordinate(t), this._tapCoordinate).manhattanDistance && !this._cancelTap && this._processEvent(i, this._handler.doubleTapEvent),
                    this._resetTapTimeout()) : this._cancelTap || (this._processEvent(i, this._handler.tapEvent),
                    this._handler.tapEvent !== void 0 && this._preventDefault(e)),
                    this._tapCount === 0 && this._preventDefault(e),
                    e.touches.length === 0 && this._longTapActive && (this._longTapActive = !1,
                    this._preventDefault(e))
                }
            }
            ,
            r.prototype._mouseUpHandler = function(e) {
                if (e.button === 0) {
                    var t = this._makeCompatEvent(e);
                    this._mouseMoveStartCoordinate = null,
                    this._mousePressed = !1,
                    this._unsubscribeRootMouseEvents !== null && (this._unsubscribeRootMouseEvents(),
                    this._unsubscribeRootMouseEvents = null),
                    bo() && this._target.ownerDocument.documentElement.removeEventListener("mouseleave", this._onFirefoxOutsideMouseUp),
                    this._firesTouchEvents(e) || (this._processEvent(t, this._handler.mouseUpEvent),
                    ++this._clickCount,
                    this._clickTimeoutId !== null && this._clickCount > 1 ? (5 > this._mouseTouchMoveWithDownInfo(this._getCoordinate(e), this._clickCoordinate).manhattanDistance && !this._cancelClick && this._processEvent(t, this._handler.mouseDoubleClickEvent),
                    this._resetClickTimeout()) : this._cancelClick || this._processEvent(t, this._handler.mouseClickEvent))
                }
            }
            ,
            r.prototype._clearLongTapTimeout = function() {
                this._longTapTimeoutId !== null && (clearTimeout(this._longTapTimeoutId),
                this._longTapTimeoutId = null)
            }
            ,
            r.prototype._touchStartHandler = function(e) {
                if (this._activeTouchId === null) {
                    var t = e.changedTouches[0];
                    this._activeTouchId = t.identifier,
                    this._lastTouchEventTimeStamp = this._eventTimeStamp(e);
                    var i = this._target.ownerDocument.documentElement;
                    this._cancelTap = !1,
                    this._touchMoveExceededManhattanDistance = !1,
                    this._preventTouchDragProcess = !1,
                    this._touchMoveStartCoordinate = this._getCoordinate(t),
                    this._unsubscribeRootTouchEvents !== null && (this._unsubscribeRootTouchEvents(),
                    this._unsubscribeRootTouchEvents = null);
                    var o = this._touchMoveHandler.bind(this)
                      , s = this._touchEndHandler.bind(this);
                    this._unsubscribeRootTouchEvents = function() {
                        i.removeEventListener("touchmove", o),
                        i.removeEventListener("touchend", s)
                    }
                    ,
                    i.addEventListener("touchmove", o, {
                        passive: !1
                    }),
                    i.addEventListener("touchend", s, {
                        passive: !1
                    }),
                    this._clearLongTapTimeout(),
                    this._longTapTimeoutId = setTimeout(this._longTapHandler.bind(this, e), 500),
                    this._processEvent(this._makeCompatEvent(e, t), this._handler.touchStartEvent),
                    this._tapTimeoutId === null && (this._tapCount = 0,
                    this._tapTimeoutId = setTimeout(this._resetTapTimeout.bind(this), 500),
                    this._tapCoordinate = this._getCoordinate(t))
                }
            }
            ,
            r.prototype._mouseDownHandler = function(e) {
                if (e.button === 2)
                    return this._preventDefault(e),
                    void this._processEvent(this._makeCompatEvent(e), this._handler.mouseRightClickEvent);
                if (e.button === 0) {
                    var t = this._target.ownerDocument.documentElement;
                    bo() && t.addEventListener("mouseleave", this._onFirefoxOutsideMouseUp),
                    this._cancelClick = !1,
                    this._mouseMoveStartCoordinate = this._getCoordinate(e),
                    this._unsubscribeRootMouseEvents !== null && (this._unsubscribeRootMouseEvents(),
                    this._unsubscribeRootMouseEvents = null);
                    var i = this._mouseMoveWithDownHandler.bind(this)
                      , o = this._mouseUpHandler.bind(this);
                    this._unsubscribeRootMouseEvents = function() {
                        t.removeEventListener("mousemove", i),
                        t.removeEventListener("mouseup", o)
                    }
                    ,
                    t.addEventListener("mousemove", i),
                    t.addEventListener("mouseup", o),
                    this._mousePressed = !0,
                    this._firesTouchEvents(e) || (this._processEvent(this._makeCompatEvent(e), this._handler.mouseDownEvent),
                    this._clickTimeoutId === null && (this._clickCount = 0,
                    this._clickTimeoutId = setTimeout(this._resetClickTimeout.bind(this), 500),
                    this._clickCoordinate = this._getCoordinate(e)))
                }
            }
            ,
            r.prototype._init = function() {
                var e = this;
                this._target.addEventListener("mouseenter", this._mouseEnterHandler.bind(this)),
                this._target.addEventListener("touchcancel", this._clearLongTapTimeout.bind(this));
                var t = this._target.ownerDocument
                  , i = function(o) {
                    e._handler.mouseDownOutsideEvent != null && (o.composed && e._target.contains(o.composedPath()[0]) || o.target !== null && e._target.contains(o.target) || e._handler.mouseDownOutsideEvent({
                        x: 0,
                        y: 0,
                        pageX: 0,
                        pageY: 0
                    }))
                };
                this._unsubscribeOutsideTouchEvents = function() {
                    t.removeEventListener("touchstart", i)
                }
                ,
                this._unsubscribeOutsideMouseEvents = function() {
                    t.removeEventListener("mousedown", i)
                }
                ,
                t.addEventListener("mousedown", i),
                t.addEventListener("touchstart", i, {
                    passive: !0
                }),
                li() && (this._unsubscribeMobileSafariEvents = function() {
                    e._target.removeEventListener("dblclick", e._onMobileSafariDoubleClick)
                }
                ,
                this._target.addEventListener("dblclick", this._onMobileSafariDoubleClick)),
                this._target.addEventListener("mouseleave", this._mouseLeaveHandler.bind(this)),
                this._target.addEventListener("touchstart", this._touchStartHandler.bind(this), {
                    passive: !0
                }),
                this._target.addEventListener("mousedown", function(o) {
                    if (o.button === 1)
                        return o.preventDefault(),
                        !1
                }),
                this._target.addEventListener("mousedown", this._mouseDownHandler.bind(this)),
                this._initPinch(),
                this._target.addEventListener("touchmove", function() {}, {
                    passive: !1
                })
            }
            ,
            r.prototype._initPinch = function() {
                var e = this;
                this._handler.pinchStartEvent === void 0 && this._handler.pinchEvent === void 0 && this._handler.pinchEndEvent === void 0 || (this._target.addEventListener("touchstart", function(t) {
                    return e._checkPinchState(t.touches)
                }, {
                    passive: !0
                }),
                this._target.addEventListener("touchmove", function(t) {
                    if (t.touches.length === 2 && e._startPinchMiddleCoordinate !== null && e._handler.pinchEvent !== void 0) {
                        var i = e._getTouchDistance(t.touches[0], t.touches[1]) / e._startPinchDistance;
                        e._handler.pinchEvent(X(X({}, e._startPinchMiddleCoordinate), {
                            pageX: 0,
                            pageY: 0
                        }), i),
                        e._preventDefault(t)
                    }
                }, {
                    passive: !1
                }),
                this._target.addEventListener("touchend", function(t) {
                    e._checkPinchState(t.touches)
                }))
            }
            ,
            r.prototype._checkPinchState = function(e) {
                e.length === 1 && (this._pinchPrevented = !1),
                e.length !== 2 || this._pinchPrevented || this._longTapActive ? this._stopPinch() : this._startPinch(e)
            }
            ,
            r.prototype._startPinch = function(e) {
                var t, i = (t = this._target.getBoundingClientRect()) !== null && t !== void 0 ? t : {
                    left: 0,
                    top: 0
                };
                this._startPinchMiddleCoordinate = {
                    x: (e[0].clientX - i.left + (e[1].clientX - i.left)) / 2,
                    y: (e[0].clientY - i.top + (e[1].clientY - i.top)) / 2
                },
                this._startPinchDistance = this._getTouchDistance(e[0], e[1]),
                this._handler.pinchStartEvent !== void 0 && this._handler.pinchStartEvent({
                    x: 0,
                    y: 0,
                    pageX: 0,
                    pageY: 0
                }),
                this._clearLongTapTimeout()
            }
            ,
            r.prototype._stopPinch = function() {
                this._startPinchMiddleCoordinate !== null && (this._startPinchMiddleCoordinate = null,
                this._handler.pinchEndEvent !== void 0 && this._handler.pinchEndEvent({
                    x: 0,
                    y: 0,
                    pageX: 0,
                    pageY: 0
                }))
            }
            ,
            r.prototype._mouseLeaveHandler = function(e) {
                var t, i, o;
                (t = this._unsubscribeMousemove) === null || t === void 0 || t.call(this),
                (i = this._unsubscribeMouseWheel) === null || i === void 0 || i.call(this),
                (o = this._unsubscribeContextMenu) === null || o === void 0 || o.call(this),
                this._firesTouchEvents(e) || this._acceptMouseLeave && (this._processEvent(this._makeCompatEvent(e), this._handler.mouseLeaveEvent),
                this._acceptMouseLeave = !li())
            }
            ,
            r.prototype._longTapHandler = function(e) {
                var t = this._touchWithId(e.touches, this._activeTouchId);
                t !== null && (this._processEvent(this._makeCompatEvent(e, t), this._handler.longTapEvent),
                this._cancelTap = !0,
                this._longTapActive = !0)
            }
            ,
            r.prototype._firesTouchEvents = function(e) {
                var t;
                return ((t = e.sourceCapabilities) === null || t === void 0 ? void 0 : t.firesTouchEvents) !== void 0 ? e.sourceCapabilities.firesTouchEvents : this._eventTimeStamp(e) < this._lastTouchEventTimeStamp + 500
            }
            ,
            r.prototype._processEvent = function(e, t) {
                t == null || t.call(this._handler, e)
            }
            ,
            r.prototype._makeCompatEvent = function(e, t) {
                var i, o = this, s = t ?? e, u = (i = this._target.getBoundingClientRect()) !== null && i !== void 0 ? i : {
                    left: 0,
                    top: 0
                };
                return {
                    x: s.clientX - u.left,
                    y: s.clientY - u.top,
                    pageX: s.pageX,
                    pageY: s.pageY,
                    isTouch: !e.type.startsWith("mouse") && e.type !== "contextmenu" && e.type !== "click",
                    preventDefault: function() {
                        e.type !== "touchstart" && o._preventDefault(e)
                    }
                }
            }
            ,
            r.prototype._getTouchDistance = function(e, t) {
                var i = e.clientX - t.clientX
                  , o = e.clientY - t.clientY;
                return Math.sqrt(i * i + o * o)
            }
            ,
            r.prototype._preventDefault = function(e) {
                e.cancelable && e.preventDefault()
            }
            ,
            r.prototype._getCoordinate = function(e) {
                return {
                    x: e.pageX,
                    y: e.pageY
                }
            }
            ,
            r.prototype._eventTimeStamp = function(e) {
                var t;
                return (t = e.timeStamp) !== null && t !== void 0 ? t : performance.now()
            }
            ,
            r.prototype._touchWithId = function(e, t) {
                for (var i = 0; e.length > i; ++i)
                    if (e[i].identifier === t)
                        return e[i];
                return null
            }
            ,
            r
        }(), ra = function() {
            function r(e, t) {
                var i = this;
                this._flingStartTime = new Date().getTime(),
                this._flingScrollRequestId = null,
                this._startScrollCoordinate = null,
                this._touchCoordinate = null,
                this._touchCancelCrosshair = !1,
                this._touchZoomed = !1,
                this._pinchScale = 1,
                this._mouseDownWidget = null,
                this._prevYAxisExtremum = null,
                this._xAxisStartScaleCoordinate = null,
                this._xAxisStartScaleDistance = 0,
                this._xAxisScale = 1,
                this._yAxisStartScaleDistance = 0,
                this._mouseMoveTriggerWidgetInfo = {
                    pane: null,
                    widget: null
                },
                this._boundKeyBoardDownEvent = function(o) {
                    if (o.shiftKey)
                        switch (o.code) {
                        case "Equal":
                            i._chart.getChartStore().getTimeScaleStore().zoom(.5);
                            break;
                        case "Minus":
                            i._chart.getChartStore().getTimeScaleStore().zoom(-.5);
                            break;
                        case "ArrowLeft":
                            (s = i._chart.getChartStore().getTimeScaleStore()).startScroll(),
                            s.scroll(-3 * s.getBarSpace().bar);
                            break;
                        case "ArrowRight":
                            var s;
                            (s = i._chart.getChartStore().getTimeScaleStore()).startScroll(),
                            s.scroll(3 * s.getBarSpace().bar)
                        }
                }
                ,
                this._container = e,
                this._chart = t,
                this._event = new oa(e,this,{
                    treatVertDragAsPageScroll: function() {
                        return !1
                    },
                    treatHorzDragAsPageScroll: function() {
                        return !1
                    }
                }),
                e.addEventListener("keydown", this._boundKeyBoardDownEvent)
            }
            return r.prototype.pinchStartEvent = function() {
                return this._touchZoomed = !0,
                this._pinchScale = 1,
                !0
            }
            ,
            r.prototype.pinchEvent = function(e, t) {
                var i = this._findWidgetByEvent(e)
                  , o = i.pane
                  , s = i.widget;
                if ((o == null ? void 0 : o.getId()) !== Ze && (s == null ? void 0 : s.getName()) === je) {
                    var u = this._makeWidgetEvent(e, s)
                      , c = 5 * (t - this._pinchScale);
                    return this._pinchScale = t,
                    this._chart.getChartStore().getTimeScaleStore().zoom(c, {
                        x: u.x,
                        y: u.y
                    }),
                    !0
                }
                return !1
            }
            ,
            r.prototype.mouseWheelHortEvent = function(e, t) {
                var i = this._chart.getChartStore().getTimeScaleStore();
                return i.startScroll(),
                i.scroll(t),
                !0
            }
            ,
            r.prototype.mouseWheelVertEvent = function(e, t) {
                var i, o, s = this._findWidgetByEvent(e).widget, u = (i = e.isTouch) !== null && i !== void 0 && i, c = this._makeWidgetEvent(e, s), h = null, d = s == null ? void 0 : s.getName();
                if (u)
                    if (d === je || d === ot)
                        h = {
                            x: c.x,
                            y: c.y
                        };
                    else {
                        var p = (o = this._chart.getPaneById(We)) === null || o === void 0 ? void 0 : o.getBounding();
                        h = {
                            x: p.width / 2,
                            y: p.height / 2
                        }
                    }
                else
                    d === je && (h = {
                        x: c.x,
                        y: c.y
                    });
                return h !== null && (this._chart.getChartStore().getTimeScaleStore().zoom(t, {
                    x: c.x,
                    y: c.y
                }),
                !0)
            }
            ,
            r.prototype.mouseDownEvent = function(e) {
                var t, i, o = this._findWidgetByEvent(e), s = o.pane, u = o.widget;
                if (this._mouseDownWidget = u,
                u !== null) {
                    var c = this._makeWidgetEvent(e, u);
                    switch (u.getName()) {
                    case ln:
                        return u.dispatchEvent("mouseDownEvent", c);
                    case je:
                        var h = (t = s == null ? void 0 : s.getAxisComponent().getExtremum()) !== null && t !== void 0 ? t : null;
                        return this._prevYAxisExtremum = h === null ? h : X({}, h),
                        this._startScrollCoordinate = {
                            x: c.x,
                            y: c.y
                        },
                        this._chart.getChartStore().getTimeScaleStore().startScroll(),
                        u.dispatchEvent("mouseDownEvent", c);
                    case ot:
                        return (d = u.dispatchEvent("mouseDownEvent", c)) && this._chart.updatePane(1),
                        this._xAxisStartScaleCoordinate = {
                            x: c.x,
                            y: c.y
                        },
                        this._xAxisStartScaleDistance = c.pageX,
                        d;
                    case rt:
                        var d;
                        return (d = u.dispatchEvent("mouseDownEvent", c)) && this._chart.updatePane(1),
                        h = (i = s == null ? void 0 : s.getAxisComponent().getExtremum()) !== null && i !== void 0 ? i : null,
                        this._prevYAxisExtremum = h === null ? h : X({}, h),
                        this._yAxisStartScaleDistance = c.pageY,
                        d
                    }
                }
                return !1
            }
            ,
            r.prototype.mouseMoveEvent = function(e) {
                var t, i, o, s = this._findWidgetByEvent(e), u = s.pane, c = s.widget, h = this._makeWidgetEvent(e, c);
                if (((t = this._mouseMoveTriggerWidgetInfo.pane) === null || t === void 0 ? void 0 : t.getId()) === (u == null ? void 0 : u.getId()) && ((i = this._mouseMoveTriggerWidgetInfo.widget) === null || i === void 0 ? void 0 : i.getName()) === (c == null ? void 0 : c.getName()) || (c == null || c.dispatchEvent("mouseEnterEvent", h),
                (o = this._mouseMoveTriggerWidgetInfo.widget) === null || o === void 0 || o.dispatchEvent("mouseLeaveEvent", h),
                this._mouseMoveTriggerWidgetInfo = {
                    pane: u,
                    widget: c
                }),
                c !== null)
                    switch (c.getName()) {
                    case je:
                        var d = c.dispatchEvent("mouseMoveEvent", h)
                          , p = this._chart.getChartStore()
                          , g = {
                            x: h.x,
                            y: h.y,
                            paneId: u == null ? void 0 : u.getId()
                        };
                        return d && p.getTooltipStore().getActiveIconInfo() !== null && (g = void 0,
                        c !== null && (c.getContainer().style.cursor = "pointer")),
                        this._chart.getChartStore().getCrosshairStore().set(g),
                        d;
                    case ln:
                    case ot:
                    case rt:
                        return d = c.dispatchEvent("mouseMoveEvent", h),
                        this._chart.getChartStore().getCrosshairStore().set(),
                        d
                    }
                return !1
            }
            ,
            r.prototype.pressedMouseMoveEvent = function(e) {
                var t, i, o, s;
                if (this._mouseDownWidget !== null && this._mouseDownWidget.getName() === ln)
                    return this._mouseDownWidget.dispatchEvent("pressedMouseMoveEvent", e);
                var u = this._findWidgetByEvent(e)
                  , c = u.pane
                  , h = u.widget;
                if (h !== null && ((t = this._mouseDownWidget) === null || t === void 0 ? void 0 : t.getPane().getId()) === (c == null ? void 0 : c.getId()) && ((i = this._mouseDownWidget) === null || i === void 0 ? void 0 : i.getName()) === h.getName()) {
                    var d = this._makeWidgetEvent(e, h);
                    switch (h.getName()) {
                    case je:
                        var p = h.getBounding();
                        if (!(k = h.dispatchEvent("pressedMouseMoveEvent", d)) && this._startScrollCoordinate !== null) {
                            var g = c == null ? void 0 : c.getAxisComponent();
                            if (this._prevYAxisExtremum !== null && !g.getAutoCalcTickFlag()) {
                                var y = this._prevYAxisExtremum
                                  , f = y.min
                                  , x = y.max + (F = (E = y.range) * (D = ((o = g == null ? void 0 : g.isReverse()) !== null && o !== void 0 && o ? this._startScrollCoordinate.y - d.y : d.y - this._startScrollCoordinate.y) / p.height))
                                  , _ = g.convertToRealValue(z = f + F)
                                  , w = g.convertToRealValue(x);
                                g.setExtremum({
                                    min: z,
                                    max: x,
                                    range: x - z,
                                    realMin: _,
                                    realMax: w,
                                    realRange: w - _
                                })
                            }
                            var L = d.x - this._startScrollCoordinate.x;
                            this._chart.getChartStore().getTimeScaleStore().scroll(L)
                        }
                        return this._chart.getChartStore().getCrosshairStore().set({
                            x: d.x,
                            y: d.y,
                            paneId: c == null ? void 0 : c.getId()
                        }),
                        k;
                    case ot:
                        if (k = h.dispatchEvent("pressedMouseMoveEvent", d))
                            this._chart.updatePane(1);
                        else {
                            var M = 10 * ((D = this._xAxisStartScaleDistance / d.pageX) - this._xAxisScale);
                            this._xAxisScale = D,
                            this._chart.getChartStore().getTimeScaleStore().zoom(M, (s = this._xAxisStartScaleCoordinate) !== null && s !== void 0 ? s : void 0)
                        }
                        return k;
                    case rt:
                        var k;
                        if (k = h.dispatchEvent("pressedMouseMoveEvent", d))
                            this._chart.updatePane(1);
                        else if (this._prevYAxisExtremum !== null) {
                            var E, D, F, N = this._prevYAxisExtremum, O = (E = N.range) * (D = d.pageY / this._yAxisStartScaleDistance), z = (f = N.min) - (F = (O - E) / 2);
                            x = N.max + F,
                            _ = (g = c == null ? void 0 : c.getAxisComponent()).convertToRealValue(z),
                            w = g.convertToRealValue(x),
                            g.setExtremum({
                                min: z,
                                max: x,
                                range: O,
                                realMin: _,
                                realMax: w,
                                realRange: w - _
                            }),
                            this._chart.adjustPaneViewport(!1, !0, !0, !0)
                        }
                        return k
                    }
                }
                return !1
            }
            ,
            r.prototype.mouseUpEvent = function(e) {
                var t = this._findWidgetByEvent(e).widget
                  , i = !1;
                if (t !== null) {
                    var o = this._makeWidgetEvent(e, t);
                    switch (t.getName()) {
                    case je:
                    case ln:
                    case ot:
                    case rt:
                        i = t.dispatchEvent("mouseUpEvent", o)
                    }
                    i && this._chart.updatePane(1)
                }
                return this._mouseDownWidget = null,
                this._startScrollCoordinate = null,
                this._prevYAxisExtremum = null,
                this._xAxisStartScaleCoordinate = null,
                this._xAxisStartScaleDistance = 0,
                this._xAxisScale = 1,
                this._yAxisStartScaleDistance = 0,
                i
            }
            ,
            r.prototype.mouseClickEvent = function(e) {
                var t = this._findWidgetByEvent(e).widget;
                if (t !== null) {
                    var i = this._makeWidgetEvent(e, t);
                    return t.dispatchEvent("mouseClickEvent", i)
                }
                return !1
            }
            ,
            r.prototype.mouseRightClickEvent = function(e) {
                var t = this._findWidgetByEvent(e).widget
                  , i = !1;
                if (t !== null) {
                    var o = this._makeWidgetEvent(e, t);
                    switch (t.getName()) {
                    case je:
                    case ot:
                    case rt:
                        i = t.dispatchEvent("mouseRightClickEvent", o)
                    }
                    i && this._chart.updatePane(1)
                }
                return !1
            }
            ,
            r.prototype.mouseDoubleClickEvent = function(e) {
                var t = this._findWidgetByEvent(e)
                  , i = t.pane
                  , o = t.widget;
                if (o !== null)
                    switch (o.getName()) {
                    case je:
                        var s = this._makeWidgetEvent(e, o);
                        return o.dispatchEvent("mouseDoubleClickEvent", s);
                    case rt:
                        var u = i == null ? void 0 : i.getAxisComponent();
                        if (!u.getAutoCalcTickFlag())
                            return u.setAutoCalcTickFlag(!0),
                            this._chart.adjustPaneViewport(!1, !0, !0, !0),
                            !0
                    }
                return !1
            }
            ,
            r.prototype.mouseLeaveEvent = function() {
                return this._chart.getChartStore().getCrosshairStore().set(),
                !0
            }
            ,
            r.prototype.touchStartEvent = function(e) {
                var t = this._findWidgetByEvent(e)
                  , i = t.pane
                  , o = t.widget;
                if (o !== null) {
                    var s = this._makeWidgetEvent(e, o);
                    switch (o.getName()) {
                    case je:
                        var u = this._chart.getChartStore()
                          , c = u.getCrosshairStore();
                        if (o.dispatchEvent("mouseDownEvent", s))
                            return this._touchCancelCrosshair = !0,
                            this._touchCoordinate = null,
                            c.set(void 0, !0),
                            this._chart.updatePane(1),
                            !0;
                        if (this._flingScrollRequestId !== null && (clearTimeout(this._flingScrollRequestId),
                        this._flingScrollRequestId = null),
                        this._flingStartTime = new Date().getTime(),
                        this._startScrollCoordinate = {
                            x: s.x,
                            y: s.y
                        },
                        u.getTimeScaleStore().startScroll(),
                        this._touchZoomed = !1,
                        this._touchCoordinate !== null) {
                            var h = s.x - this._touchCoordinate.x
                              , d = s.y - this._touchCoordinate.y;
                            10 > Math.sqrt(h * h + d * d) ? (this._touchCoordinate = {
                                x: s.x,
                                y: s.y
                            },
                            c.set({
                                x: s.x,
                                y: s.y,
                                paneId: i == null ? void 0 : i.getId()
                            })) : (this._touchCoordinate = null,
                            this._touchCancelCrosshair = !0,
                            c.set())
                        }
                        return !0;
                    case ot:
                    case rt:
                        var p = o.dispatchEvent("mouseDownEvent", s);
                        return p && this._chart.updatePane(1),
                        p
                    }
                }
                return !1
            }
            ,
            r.prototype.touchMoveEvent = function(e) {
                var t, i, o, s = this._findWidgetByEvent(e), u = s.pane, c = s.widget;
                if (c !== null) {
                    var h = this._makeWidgetEvent(e, c)
                      , d = c.getName()
                      , p = this._chart.getChartStore()
                      , g = p.getCrosshairStore();
                    switch (d) {
                    case je:
                        if (c.dispatchEvent("pressedMouseMoveEvent", h))
                            return (t = h.preventDefault) === null || t === void 0 || t.call(h),
                            g.set(void 0, !0),
                            this._chart.updatePane(1),
                            !0;
                        if (this._touchCoordinate !== null)
                            (i = h.preventDefault) === null || i === void 0 || i.call(h),
                            g.set({
                                x: h.x,
                                y: h.y,
                                paneId: u == null ? void 0 : u.getId()
                            });
                        else if (this._startScrollCoordinate !== null && Math.abs(this._startScrollCoordinate.x - h.x) > this._startScrollCoordinate.y - h.y) {
                            var y = h.x - this._startScrollCoordinate.x;
                            p.getTimeScaleStore().scroll(y)
                        }
                        return !0;
                    case ot:
                    case rt:
                        var f = c.dispatchEvent("pressedMouseMoveEvent", h);
                        return f && ((o = h.preventDefault) === null || o === void 0 || o.call(h),
                        this._chart.updatePane(1)),
                        f
                    }
                }
                return !1
            }
            ,
            r.prototype.touchEndEvent = function(e) {
                var t = this
                  , i = this._findWidgetByEvent(e).widget;
                if (i !== null) {
                    var o = this._makeWidgetEvent(e, i);
                    switch (i.getName()) {
                    case je:
                        if (i.dispatchEvent("mouseUpEvent", o),
                        this._startScrollCoordinate !== null) {
                            var s = new Date().getTime() - this._flingStartTime
                              , u = (o.x - this._startScrollCoordinate.x) / (s > 0 ? s : 1) * 20;
                            if (200 > s && Math.abs(u) > 0) {
                                var c = this._chart.getChartStore().getTimeScaleStore()
                                  , h = function() {
                                    t._flingScrollRequestId = ti(function() {
                                        c.startScroll(),
                                        c.scroll(u),
                                        1 > Math.abs(u *= .975) ? t._flingScrollRequestId !== null && (ni(t._flingScrollRequestId),
                                        t._flingScrollRequestId = null) : h()
                                    })
                                };
                                h()
                            }
                        }
                        return !0;
                    case ot:
                    case rt:
                        i.dispatchEvent("mouseUpEvent", o) && this._chart.updatePane(1)
                    }
                }
                return !1
            }
            ,
            r.prototype.tapEvent = function(e) {
                var t = this._findWidgetByEvent(e)
                  , i = t.pane
                  , o = t.widget
                  , s = !1;
                if (o !== null) {
                    var u = this._makeWidgetEvent(e, o)
                      , c = o.dispatchEvent("mouseClickEvent", u);
                    if (o.getName() === je) {
                        var h = this._makeWidgetEvent(e, o)
                          , d = this._chart.getChartStore().getCrosshairStore();
                        c ? (this._touchCancelCrosshair = !0,
                        this._touchCoordinate = null,
                        d.set(void 0, !0),
                        s = !0) : (this._touchCancelCrosshair || this._touchZoomed || (this._touchCoordinate = {
                            x: h.x,
                            y: h.y
                        },
                        d.set({
                            x: h.x,
                            y: h.y,
                            paneId: i == null ? void 0 : i.getId()
                        }, !0),
                        s = !0),
                        this._touchCancelCrosshair = !1)
                    }
                    (s || c) && this._chart.updatePane(1)
                }
                return s
            }
            ,
            r.prototype.doubleTapEvent = function(e) {
                return this.mouseDoubleClickEvent(e)
            }
            ,
            r.prototype.longTapEvent = function(e) {
                var t = this._findWidgetByEvent(e)
                  , i = t.pane
                  , o = t.widget;
                if (o !== null && o.getName() === je) {
                    var s = this._makeWidgetEvent(e, o);
                    return this._touchCoordinate = {
                        x: s.x,
                        y: s.y
                    },
                    this._chart.getChartStore().getCrosshairStore().set({
                        x: s.x,
                        y: s.y,
                        paneId: i == null ? void 0 : i.getId()
                    }),
                    !0
                }
                return !1
            }
            ,
            r.prototype._findWidgetByEvent = function(e) {
                var t, i, o = this._chart.getAllPanes(), s = e.x, u = e.y, c = null;
                try {
                    for (var h = tt(o), d = h.next(); !d.done; d = h.next()) {
                        var p = q(d.value, 2)[1]
                          , g = p.getBounding();
                        if (!(g.left > s || s > g.left + g.width || g.top > u || u > g.top + g.height)) {
                            c = p;
                            break
                        }
                    }
                } catch (k) {
                    t = {
                        error: k
                    }
                } finally {
                    try {
                        d && !d.done && (i = h.return) && i.call(h)
                    } finally {
                        if (t)
                            throw t.error
                    }
                }
                c === null && (c = this._chart.getPaneById(Ze));
                var y = null;
                if (c !== null) {
                    var f = c.getSeparatorWidget();
                    if (f !== null) {
                        var x = f.getBounding();
                        x.left > s || s > x.left + x.width || x.top > u || u > x.top + 7 || (y = f)
                    }
                    if (y === null) {
                        var _ = c.getMainWidget()
                          , w = _.getBounding();
                        w.left > s || s > w.left + w.width || w.top > u || u > w.top + w.height || (y = _)
                    }
                    if (y === null) {
                        var L = c.getYAxisWidget();
                        if (L !== null) {
                            var M = L.getBounding();
                            M.left > s || s > M.left + M.width || M.top > u || u > M.top + M.height || (y = L)
                        }
                    }
                }
                return {
                    pane: c,
                    widget: y
                }
            }
            ,
            r.prototype._makeWidgetEvent = function(e, t) {
                var i, o, s, u = (i = t == null ? void 0 : t.getBounding()) !== null && i !== void 0 ? i : null;
                return X(X({}, e), {
                    x: e.x - ((o = u == null ? void 0 : u.left) !== null && o !== void 0 ? o : 0),
                    y: e.y - ((s = u == null ? void 0 : u.top) !== null && s !== void 0 ? s : 0)
                })
            }
            ,
            r.prototype.destroy = function() {
                this._container.removeEventListener("keydown", this._boundKeyBoardDownEvent),
                this._event.destroy()
            }
            ,
            r
        }();
        a.DomPosition = void 0,
        (ci = a.DomPosition || (a.DomPosition = {})).Root = "root",
        ci.Main = "main",
        ci.YAxis = "yAxis";
        var wo = function() {
            function r(e, t) {
                this._panes = new Map,
                this._initContainer(e),
                this._chartEvent = new ra(this._chartContainer,this),
                this._chartStore = new I1(this,t),
                this._xAxisPane = new ia(this._chartContainer,this,Ze),
                this._panes.set(We, new $1(this._chartContainer,this,We)),
                this.adjustPaneViewport(!0, !0, !0)
            }
            return r.prototype._initContainer = function(e) {
                this._container = e,
                this._chartContainer = R("div", {
                    position: "relative",
                    width: "100%",
                    outline: "none",
                    borderStyle: "none",
                    cursor: "crosshair",
                    boxSizing: "border-box",
                    userSelect: "none",
                    webkitUserSelect: "none",
                    msUserSelect: "none",
                    MozUserSelect: "none",
                    webkitTapHighlightColor: "transparent"
                }),
                this._chartContainer.tabIndex = 1,
                e.appendChild(this._chartContainer)
            }
            ,
            r.prototype._measurePaneHeight = function() {
                var e, t = this._container.offsetHeight, i = this._xAxisPane.getAxisComponent().getAutoSize(), o = t - i;
                0 > o && (o = 0);
                var s = 0;
                this._panes.forEach(function(h) {
                    if (h.getId() !== We) {
                        var d = h.getBounding().height
                          , p = h.getOptions().minHeight;
                        p > d && (d = p),
                        s + d > o ? d = Math.max(o - (s = o), 0) : s += d,
                        h.setBounding({
                            height: d
                        })
                    }
                });
                var u = o - s;
                (e = this._panes.get(We)) === null || e === void 0 || e.setBounding({
                    height: u
                });
                var c = 0;
                this._panes.forEach(function(h) {
                    h.setBounding({
                        top: c
                    }),
                    c += h.getBounding().height
                }),
                this._xAxisPane.setBounding({
                    height: i,
                    top: c
                })
            }
            ,
            r.prototype._measurePaneWidth = function() {
                var e = this._chartStore.getStyles().yAxis
                  , t = e.position === a.YAxisPosition.Left
                  , i = !e.inside
                  , o = this._container.offsetWidth
                  , s = 0
                  , u = Number.MIN_SAFE_INTEGER
                  , c = 0
                  , h = 0;
                this._panes.forEach(function(y) {
                    u = Math.max(u, y.getAxisComponent().getAutoSize())
                }),
                u > o && (u = o),
                i ? (s = o - u,
                t ? (c = 0,
                h = u) : (c = o - u,
                h = 0)) : (s = o,
                h = 0,
                c = t ? 0 : o - u),
                this._chartStore.getTimeScaleStore().setTotalBarSpace(s);
                var d = {
                    width: o
                }
                  , p = {
                    width: s,
                    left: h
                }
                  , g = {
                    width: u,
                    left: c
                };
                this._panes.forEach(function(y) {
                    y.setBounding(d, p, g)
                }),
                this._xAxisPane.setBounding(d, p, g)
            }
            ,
            r.prototype._setPaneOptions = function(e, t) {
                var i, o, s = this._panes.get((i = e == null ? void 0 : e.id) !== null && i !== void 0 ? i : ""), u = !1;
                if (s !== void 0) {
                    var c = t;
                    if (e.id !== We && e.height !== void 0 && e.height > 0) {
                        var h = Math.max((o = e.minHeight) !== null && o !== void 0 ? o : s.getOptions().minHeight, 0);
                        s.setBounding({
                            height: Math.max(h, e.height)
                        }),
                        c = !0,
                        u = !0
                    }
                    s.setOptions(e),
                    c && this.adjustPaneViewport(u, !0, !0, !0, !0)
                }
            }
            ,
            r.prototype.getContainer = function() {
                return this._container
            }
            ,
            r.prototype.getChartStore = function() {
                return this._chartStore
            }
            ,
            r.prototype.getAllPanes = function() {
                return this._panes
            }
            ,
            r.prototype.adjustPaneViewport = function(e, t, i, o, s) {
                e && this._measurePaneHeight();
                var u = t
                  , c = s != null && s;
                (o != null && o || c) && this._panes.forEach(function(h) {
                    var d = h.getAxisComponent().buildTicks(c);
                    u || (u = d)
                }),
                u && this._measurePaneWidth(),
                i != null && i && (this._xAxisPane.getAxisComponent().buildTicks(!0),
                this.updatePane(4))
            }
            ,
            r.prototype.updatePane = function(e, t) {
                var i;
                t !== void 0 ? (i = this.getPaneById(t)) === null || i === void 0 || i.update(e) : (this._xAxisPane.update(e),
                this._panes.forEach(function(o) {
                    o.update(e)
                }))
            }
            ,
            r.prototype.getPaneById = function(e) {
                var t;
                return e === Ze ? this._xAxisPane : (t = this._panes.get(e)) !== null && t !== void 0 ? t : null
            }
            ,
            r.prototype.crosshairChange = function(e) {
                var t = this
                  , i = this._chartStore.getActionStore();
                if (i.has(a.ActionType.OnCrosshairChange)) {
                    var o = {};
                    this._panes.forEach(function(s, u) {
                        var c = {};
                        t._chartStore.getIndicatorStore().getInstances(u).forEach(function(h) {
                            var d, p = h.result;
                            c[h.name] = p[(d = e.dataIndex) !== null && d !== void 0 ? d : p.length - 1]
                        }),
                        o[u] = c
                    }),
                    e.paneId !== void 0 && i.execute(a.ActionType.OnCrosshairChange, X(X({}, e), {
                        indicatorData: o
                    }))
                }
            }
            ,
            r.prototype.getDom = function(e, t) {
                var i, o;
                if (e === void 0)
                    return this._chartContainer;
                var s = this.getPaneById(e);
                if (s !== null)
                    switch (t ?? a.DomPosition.Root) {
                    case a.DomPosition.Root:
                        return s.getContainer();
                    case a.DomPosition.Main:
                        return s.getMainWidget().getContainer();
                    case a.DomPosition.YAxis:
                        return (o = (i = s.getYAxisWidget()) === null || i === void 0 ? void 0 : i.getContainer()) !== null && o !== void 0 ? o : null
                    }
                return null
            }
            ,
            r.prototype.getSize = function(e, t) {
                var i, o;
                if (e === void 0)
                    return {
                        width: this._chartContainer.offsetWidth,
                        height: this._chartContainer.offsetHeight,
                        left: 0,
                        top: 0,
                        right: 0,
                        bottom: 0
                    };
                var s = this.getPaneById(e);
                if (s !== null)
                    switch (t ?? a.DomPosition.Root) {
                    case a.DomPosition.Root:
                        return s.getBounding();
                    case a.DomPosition.Main:
                        return s.getMainWidget().getBounding();
                    case a.DomPosition.YAxis:
                        return (o = (i = s.getYAxisWidget()) === null || i === void 0 ? void 0 : i.getBounding()) !== null && o !== void 0 ? o : null
                    }
                return null
            }
            ,
            r.prototype.setStyles = function(e) {
                var t, i, o;
                this._chartStore.setOptions({
                    styles: e
                }),
                ((t = (o = B(e) ? to(e) : e) == null ? void 0 : o.yAxis) === null || t === void 0 ? void 0 : t.type) !== void 0 && ((i = this.getPaneById(We)) === null || i === void 0 || i.getAxisComponent().setAutoCalcTickFlag(!0)),
                this.adjustPaneViewport(!0, !0, !0, !0, !0)
            }
            ,
            r.prototype.getStyles = function() {
                return this._chartStore.getStyles()
            }
            ,
            r.prototype.setLocale = function(e) {
                this._chartStore.setOptions({
                    locale: e
                }),
                this.adjustPaneViewport(!0, !0, !0, !0, !0)
            }
            ,
            r.prototype.getLocale = function() {
                return this._chartStore.getLocale()
            }
            ,
            r.prototype.setCustomApi = function(e) {
                this._chartStore.setOptions({
                    customApi: e
                }),
                this.adjustPaneViewport(!0, !0, !0, !0, !0)
            }
            ,
            r.prototype.setPriceVolumePrecision = function(e, t) {
                this._chartStore.setPrecision({
                    price: e,
                    volume: t
                })
            }
            ,
            r.prototype.getPriceVolumePrecision = function() {
                return this._chartStore.getPrecision()
            }
            ,
            r.prototype.setTimezone = function(e) {
                this._chartStore.setOptions({
                    timezone: e
                }),
                this._xAxisPane.getAxisComponent().buildTicks(!0),
                this._xAxisPane.update(3)
            }
            ,
            r.prototype.getTimezone = function() {
                return this._chartStore.getTimeScaleStore().getTimezone()
            }
            ,
            r.prototype.setOffsetRightDistance = function(e) {
                this._chartStore.getTimeScaleStore().setOffsetRightDistance(e, !0)
            }
            ,
            r.prototype.getOffsetRightDistance = function() {
                return this._chartStore.getTimeScaleStore().getOffsetRightDistance()
            }
            ,
            r.prototype.setLeftMinVisibleBarCount = function(e) {
                e > 0 && this._chartStore.getTimeScaleStore().setLeftMinVisibleBarCount(Math.ceil(e))
            }
            ,
            r.prototype.setRightMinVisibleBarCount = function(e) {
                e > 0 && this._chartStore.getTimeScaleStore().setRightMinVisibleBarCount(Math.ceil(e))
            }
            ,
            r.prototype.setBarSpace = function(e) {
                this._chartStore.getTimeScaleStore().setBarSpace(e)
            }
            ,
            r.prototype.getBarSpace = function() {
                return this._chartStore.getTimeScaleStore().getBarSpace().bar
            }
            ,
            r.prototype.getVisibleRange = function() {
                return this._chartStore.getTimeScaleStore().getVisibleRange()
            }
            ,
            r.prototype.clearData = function() {
                this._chartStore.clearDataList()
            }
            ,
            r.prototype.getDataList = function() {
                return this._chartStore.getDataList()
            }
            ,
            r.prototype.applyNewData = function(e, t, i) {
                this._chartStore.clearDataList(),
                e.length === 0 ? this.adjustPaneViewport(!1, !0, !0, !0) : this.applyMoreData(e, t, i)
            }
            ,
            r.prototype.applyMoreData = function(e, t, i) {
                var o = this;
                this._chartStore.addData(e, 0, t),
                e.length > 0 && this._chartStore.getIndicatorStore().calcInstance().then(function(s) {
                    o.adjustPaneViewport(!1, !0, !0, !0),
                    i == null || i()
                }).catch(function(s) {})
            }
            ,
            r.prototype.updateData = function(e, t) {
                var i = this
                  , o = this._chartStore.getDataList()
                  , s = o.length
                  , u = e.timestamp
                  , c = ue(o[s - 1], "timestamp", 0);
                if (u >= c) {
                    var h = s;
                    u === c && (h = s - 1),
                    this._chartStore.addData(e, h),
                    this._chartStore.getIndicatorStore().calcInstance().then(function(d) {
                        i.adjustPaneViewport(!1, !0, !0, !0),
                        t == null || t()
                    }).catch(function(d) {})
                }
            }
            ,
            r.prototype.loadMore = function(e) {
                this._chartStore.getTimeScaleStore().setLoadMoreCallback(e)
            }
            ,
            r.prototype.createIndicator = function(e, t, i, o) {
                var s, u, c, h = this, d = B(e) ? {
                    name: e
                } : e;
                if (Qi(d.name) === null)
                    return null;
                if ((i == null ? void 0 : i.id) !== void 0 && this._panes.has(i.id))
                    c = i.id,
                    this._chartStore.getIndicatorStore().addInstance(d, c, t != null && t).then(function(f) {
                        var x, _;
                        h._setPaneOptions(i, (_ = (x = h._panes.get(c)) === null || x === void 0 ? void 0 : x.getAxisComponent().buildTicks(!0)) !== null && _ !== void 0 && _)
                    }).catch(function(f) {});
                else {
                    c = (s = i == null ? void 0 : i.id) !== null && s !== void 0 ? s : V(A1);
                    var p = Array.from(this._panes.values()).pop()
                      , g = new _o(this._chartContainer,this,c,p);
                    p.setBottomPane(g);
                    var y = (u = i == null ? void 0 : i.height) !== null && u !== void 0 ? u : 100;
                    g.setBounding({
                        height: y
                    }),
                    i != null && g.setOptions(i),
                    this._panes.set(c, g),
                    this._chartStore.getIndicatorStore().addInstance(d, c, t != null && t).finally(function() {
                        h.adjustPaneViewport(!0, !0, !0, !0, !0),
                        o == null || o()
                    })
                }
                return c
            }
            ,
            r.prototype.overrideIndicator = function(e, t, i) {
                var o = this;
                this._chartStore.getIndicatorStore().override(e, t ?? null).then(function(s) {
                    var u = q(s, 2)
                      , c = u[1];
                    (u[0] || c) && (o.adjustPaneViewport(!1, c, !0, c),
                    i == null || i())
                }).catch(function() {})
            }
            ,
            r.prototype.getIndicatorByPaneId = function(e, t) {
                return this._chartStore.getIndicatorStore().getInstanceByPaneId(e, t)
            }
            ,
            r.prototype.removeIndicator = function(e, t) {
                var i = this._chartStore.getIndicatorStore();
                if (i.removeInstance(e, t)) {
                    var o = !1;
                    if (e !== We && !i.hasInstances(e)) {
                        var s = this._panes.get(e);
                        if (s !== void 0) {
                            o = !0;
                            var u = s.getTopPane()
                              , c = s.getBottomPane();
                            c == null || c.setTopPane(u),
                            u == null || u.setBottomPane(c),
                            s == null || s.destroy(),
                            this._panes.delete(e)
                        }
                    }
                    this.adjustPaneViewport(o, !0, !0, !0, !0)
                }
            }
            ,
            r.prototype.createOverlay = function(e, t) {
                var i = B(e) ? {
                    name: e
                } : e;
                if (Gi(i.name) === null)
                    return null;
                var o = !0;
                return t !== void 0 && this.getPaneById(t) !== null || (t = We,
                o = !1),
                this._chartStore.getOverlayStore().addInstance(i, t, o)
            }
            ,
            r.prototype.getOverlayById = function(e) {
                return this._chartStore.getOverlayStore().getInstanceById(e)
            }
            ,
            r.prototype.overrideOverlay = function(e) {
                this._chartStore.getOverlayStore().override(e)
            }
            ,
            r.prototype.removeOverlay = function(e) {
                var t;
                e !== void 0 && (t = B(e) ? {
                    id: e
                } : e),
                this._chartStore.getOverlayStore().removeInstance(t)
            }
            ,
            r.prototype.setPaneOptions = function(e) {
                this._setPaneOptions(e, !1)
            }
            ,
            r.prototype.setZoomEnabled = function(e) {
                this._chartStore.getTimeScaleStore().setZoomEnabled(e)
            }
            ,
            r.prototype.isZoomEnabled = function() {
                return this._chartStore.getTimeScaleStore().getZoomEnabled()
            }
            ,
            r.prototype.setScrollEnabled = function(e) {
                this._chartStore.getTimeScaleStore().setScrollEnabled(e)
            }
            ,
            r.prototype.isScrollEnabled = function() {
                return this._chartStore.getTimeScaleStore().getScrollEnabled()
            }
            ,
            r.prototype.scrollByDistance = function(e, t) {
                var i = t === void 0 || 0 > t ? 0 : t
                  , o = this._chartStore.getTimeScaleStore();
                if (i > 0) {
                    o.startScroll();
                    var s = new Date().getTime()
                      , u = function() {
                        var c = (new Date().getTime() - s) / i
                          , h = c >= 1;
                        o.scroll(h ? e : e * c),
                        h || requestAnimationFrame(u)
                    };
                    u()
                } else
                    o.startScroll(),
                    o.scroll(e)
            }
            ,
            r.prototype.scrollToRealTime = function(e) {
                var t = this._chartStore.getTimeScaleStore()
                  , i = t.getBarSpace().bar
                  , o = t.getOffsetRightBarCount() - t.getInitialOffsetRightDistance() / i;
                this.scrollByDistance(o * i, e)
            }
            ,
            r.prototype.scrollToDataIndex = function(e, t) {
                var i = this._chartStore.getTimeScaleStore()
                  , o = (i.getOffsetRightBarCount() + (this.getDataList().length - 1 - e)) * i.getBarSpace().bar;
                this.scrollByDistance(o, t)
            }
            ,
            r.prototype.scrollToTimestamp = function(e, t) {
                var i = Be(this.getDataList(), "timestamp", e);
                this.scrollToDataIndex(i, t)
            }
            ,
            r.prototype.zoomAtCoordinate = function(e, t, i) {
                var o = i === void 0 || 0 > i ? 0 : i
                  , s = this._chartStore.getTimeScaleStore();
                if (o > 0) {
                    var u = s.getBarSpace().bar
                      , c = u * e - u
                      , h = new Date().getTime()
                      , d = function() {
                        var p = (new Date().getTime() - h) / o
                          , g = p >= 1;
                        s.zoom((g ? c : c * p) / u, t),
                        g || requestAnimationFrame(d)
                    };
                    d()
                } else
                    s.zoom(e, t)
            }
            ,
            r.prototype.zoomAtDataIndex = function(e, t, i) {
                var o = this._chartStore.getTimeScaleStore().dataIndexToCoordinate(t);
                this.zoomAtCoordinate(e, {
                    x: o,
                    y: 0
                }, i)
            }
            ,
            r.prototype.zoomAtTimestamp = function(e, t, i) {
                var o = Be(this.getDataList(), "timestamp", t);
                this.zoomAtDataIndex(e, o, i)
            }
            ,
            r.prototype.convertToPixel = function(e, t) {
                var i, o = t.paneId, s = o === void 0 ? We : o, u = t.absolute, c = u !== void 0 && u, h = [];
                if (s !== Ze) {
                    var d = this.getPaneById(s);
                    if (d !== null) {
                        var p = this._chartStore.getTimeScaleStore()
                          , g = d.getBounding()
                          , y = [].concat(e)
                          , f = this._xAxisPane.getAxisComponent()
                          , x = d.getAxisComponent();
                        h = y.map(function(_) {
                            var w = {}
                              , L = _.dataIndex;
                            if (_.timestamp !== void 0 && (L = p.timestampToDataIndex(_.timestamp)),
                            L !== void 0 && (w.x = f == null ? void 0 : f.convertToPixel(L)),
                            _.value !== void 0) {
                                var M = x == null ? void 0 : x.convertToPixel(_.value);
                                w.y = c ? g.top + M : M
                            }
                            return w
                        })
                    }
                }
                return C(e) ? h : (i = h[0]) !== null && i !== void 0 ? i : {}
            }
            ,
            r.prototype.convertFromPixel = function(e, t) {
                var i, o = t.paneId, s = o === void 0 ? We : o, u = t.absolute, c = u !== void 0 && u, h = [];
                if (s !== Ze) {
                    var d = this.getPaneById(s);
                    if (d !== null) {
                        var p = this._chartStore.getTimeScaleStore()
                          , g = d.getBounding()
                          , y = [].concat(e)
                          , f = this._xAxisPane.getAxisComponent()
                          , x = d.getAxisComponent();
                        h = y.map(function(_) {
                            var w, L = {};
                            if (_.x !== void 0) {
                                var M = f.convertFromPixel(_.x);
                                L.dataIndex = M,
                                L.timestamp = (w = p.dataIndexToTimestamp(M)) !== null && w !== void 0 ? w : void 0
                            }
                            return _.y !== void 0 && (L.value = x.convertFromPixel(c ? _.y - g.top : _.y)),
                            L
                        })
                    }
                }
                return C(e) ? h : (i = h[0]) !== null && i !== void 0 ? i : {}
            }
            ,
            r.prototype.executeAction = function(e, t) {
                var i;
                if (e === a.ActionType.OnCrosshairChange) {
                    var o = X({}, t);
                    o.paneId = (i = o.paneId) !== null && i !== void 0 ? i : We,
                    this._chartStore.getCrosshairStore().set(o)
                }
            }
            ,
            r.prototype.subscribeAction = function(e, t) {
                this._chartStore.getActionStore().subscribe(e, t)
            }
            ,
            r.prototype.unsubscribeAction = function(e, t) {
                this._chartStore.getActionStore().unsubscribe(e, t)
            }
            ,
            r.prototype.getConvertPictureUrl = function(e, t, i) {
                var o = this._chartContainer.offsetWidth
                  , s = this._chartContainer.offsetHeight
                  , u = R("canvas", {
                    width: "".concat(o, "px"),
                    height: "".concat(s, "px"),
                    boxSizing: "border-box"
                })
                  , c = u.getContext("2d")
                  , h = j(u);
                u.width = o * h,
                u.height = s * h,
                c.scale(h, h),
                c.fillStyle = i ?? "#FFFFFF",
                c.fillRect(0, 0, o, s);
                var d = e != null && e;
                this._panes.forEach(function(g) {
                    var y = g.getBounding();
                    c.drawImage(g.getImage(d), 0, y.top, o, y.height)
                });
                var p = this._xAxisPane.getBounding();
                return c.drawImage(this._xAxisPane.getImage(d), 0, p.top, o, p.height),
                u.toDataURL("image/".concat(t ?? "jpeg"))
            }
            ,
            r.prototype.resize = function() {
                this.adjustPaneViewport(!0, !0, !0, !0, !0)
            }
            ,
            r.prototype.destroy = function() {
                this._chartEvent.destroy(),
                this._panes.forEach(function(e) {
                    e.destroy()
                }),
                this._panes.clear(),
                this._xAxisPane.destroy(),
                this._container.removeChild(this._chartContainer)
            }
            ,
            r
        }()
          , wn = {}
          , aa = 1
          , sa = {
            clone: m,
            merge: v,
            isString: B,
            isNumber: A,
            isValid: T,
            isObject: b,
            isArray: C,
            isFunction: S,
            isBoolean: I,
            formatValue: ue,
            formatPrecision: G,
            formatBigNumber: fe,
            formatDate: ae,
            formatThousands: Ce,
            getLinearSlopeIntercept: xn,
            getLinearYFromSlopeIntercept: qn,
            getLinearYFromCoordinates: sn,
            checkCoordinateOnArc: uo,
            checkCoordinateOnCircle: io,
            checkCoordinateOnLine: Hi,
            checkCoordinateOnPolygon: ro,
            checkCoordinateOnRect: so,
            checkCoordinateOnText: ri,
            drawArc: ho,
            drawCircle: oo,
            drawLine: Ui,
            drawPolygon: ao,
            drawRect: oi,
            drawText: ai,
            drawRectText: co
        };
        a.dispose = function(r) {
            var e, t;
            if (B(r)) {
                var i = document.getElementById(r);
                t = (e = i == null ? void 0 : i.getAttribute("chartId")) !== null && e !== void 0 ? e : null
            } else
                t = r instanceof wo ? r.id : r ?? r.chartId;
            t !== null && (wn[t].destroy(),
            delete wn[t])
        }
        ,
        a.getFigureClass = function(r) {
            var e;
            return (e = cn[r]) !== null && e !== void 0 ? e : null
        }
        ,
        a.getSupportedFigures = function() {
            return Object.keys(cn)
        }
        ,
        a.getSupportedIndicators = function() {
            return Object.keys(Cn)
        }
        ,
        a.getSupportedLocales = function() {
            return Object.keys(bn)
        }
        ,
        a.getSupportedOverlays = function() {
            return Object.keys(_n)
        }
        ,
        a.init = function(r, e) {
            var t, i;
            if ((i = B(r) ? document.getElementById(r) : r) === null)
                return null;
            var o = wn[(t = i.chartId) !== null && t !== void 0 ? t : ""];
            if (o !== void 0)
                return o;
            var s = "k_line_chart_".concat(aa++);
            return (o = new wo(i,e)).id = s,
            i.chartId = s,
            wn[s] = o,
            o
        }
        ,
        a.registerFigure = function(r) {
            cn[r.name] = no.extend(r)
        }
        ,
        a.registerIndicator = function(r) {
            Cn[r.name] = Wi.extend(r)
        }
        ,
        a.registerLocale = function(r, e) {
            bn[r] = X(X({}, bn[r]), e)
        }
        ,
        a.registerOverlay = function(r) {
            _n[r.name] = Ki.extend(r)
        }
        ,
        a.registerStyles = function(r, e) {
            eo[r] = e
        }
        ,
        a.utils = sa,
        a.version = function() {
            return "9.2.2"
        }
    })
}
)(Pa, Pn);
(function(n) {
    n.exports = Pn
}
)(Da);
var Fa = Object.defineProperty
  , Ba = (n,l,a)=>l in n ? Fa(n, l, {
    enumerable: !0,
    configurable: !0,
    writable: !0,
    value: a
}) : n[l] = a
  , En = (n,l,a)=>(Ba(n, typeof l != "symbol" ? l + "" : l, a),
a);
function gn(n, l, a) {
    const v = (n.x - l.x) * Math.cos(a) - (n.y - l.y) * Math.sin(a) + l.x
      , m = (n.x - l.x) * Math.sin(a) + (n.y - l.y) * Math.cos(a) + l.y;
    return {
        x: v,
        y: m
    }
}
function xi(n, l) {
    if (n.length > 1) {
        let a;
        return n[0].x === n[1].x && n[0].y !== n[1].y ? n[0].y < n[1].y ? a = {
            x: n[0].x,
            y: l.height
        } : a = {
            x: n[0].x,
            y: 0
        } : n[0].x > n[1].x ? a = {
            x: 0,
            y: oe.utils.getLinearYFromCoordinates(n[0], n[1], {
                x: 0,
                y: n[0].y
            })
        } : a = {
            x: l.width,
            y: oe.utils.getLinearYFromCoordinates(n[0], n[1], {
                x: l.width,
                y: n[0].y
            })
        },
        {
            coordinates: [n[0], a]
        }
    }
    return []
}
function Lr(n, l) {
    const a = Math.abs(n.x - l.x)
      , v = Math.abs(n.y - l.y);
    return Math.sqrt(a * a + v * v)
}
const Na = {
    name: "arrow",
    totalStep: 3,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    createPointFigures: ({coordinates: n})=>{
        if (n.length > 1) {
            const l = n[1].x > n[0].x ? 0 : 1
              , a = oe.utils.getLinearSlopeIntercept(n[0], n[1]);
            let v;
            a ? v = Math.atan(a[0]) + Math.PI * l : n[1].y > n[0].y ? v = Math.PI / 2 : v = Math.PI / 2 * 3;
            const m = gn({
                x: n[1].x - 8,
                y: n[1].y + 4
            }, n[1], v)
              , C = gn({
                x: n[1].x - 8,
                y: n[1].y - 4
            }, n[1], v);
            return [{
                type: "line",
                attrs: {
                    coordinates: n
                }
            }, {
                type: "line",
                ignoreEvent: !0,
                attrs: {
                    coordinates: [m, n[1], C]
                }
            }]
        }
        return []
    }
}
  , Ra = {
    name: "circle",
    totalStep: 3,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    styles: {
        circle: {
            color: "rgba(22, 119, 255, 0.15)"
        }
    },
    createPointFigures: ({coordinates: n})=>{
        if (n.length > 1) {
            const l = Lr(n[0], n[1]);
            return {
                type: "circle",
                attrs: {
                    ...n[0],
                    r: l
                },
                styles: {
                    style: "stroke_fill"
                }
            }
        }
        return []
    }
}
  , Oa = {
    name: "rect",
    totalStep: 3,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    styles: {
        polygon: {
            color: "rgba(22, 119, 255, 0.15)"
        }
    },
    createPointFigures: ({coordinates: n})=>n.length > 1 ? [{
        type: "polygon",
        attrs: {
            coordinates: [n[0], {
                x: n[1].x,
                y: n[0].y
            }, n[1], {
                x: n[0].x,
                y: n[1].y
            }]
        },
        styles: {
            style: "stroke_fill"
        }
    }] : []
}
  , za = {
    name: "parallelogram",
    totalStep: 4,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    styles: {
        polygon: {
            color: "rgba(22, 119, 255, 0.15)"
        }
    },
    createPointFigures: ({coordinates: n})=>{
        if (n.length === 2)
            return [{
                type: "line",
                ignoreEvent: !0,
                attrs: {
                    coordinates: n
                }
            }];
        if (n.length === 3) {
            const l = {
                x: n[0].x + (n[2].x - n[1].x),
                y: n[2].y
            };
            return [{
                type: "polygon",
                attrs: {
                    coordinates: [n[0], n[1], n[2], l]
                },
                styles: {
                    style: "stroke_fill"
                }
            }]
        }
        return []
    }
    ,
    performEventPressedMove: ({points: n, performPointIndex: l, performPoint: a})=>{
        l < 2 && (n[0].price = a.price,
        n[1].price = a.price)
    }
    ,
    performEventMoveForDrawing: ({currentStep: n, points: l, performPoint: a})=>{
        n === 2 && (l[0].price = a.price)
    }
}
  , Ya = {
    name: "triangle",
    totalStep: 4,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    styles: {
        polygon: {
            color: "rgba(22, 119, 255, 0.15)"
        }
    },
    createPointFigures: ({coordinates: n})=>[{
        type: "polygon",
        attrs: {
            coordinates: n
        },
        styles: {
            style: "stroke_fill"
        }
    }]
}
  , Va = {
    name: "fibonacciCircle",
    totalStep: 3,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    createPointFigures: ({coordinates: n})=>{
        if (n.length > 1) {
            const l = Math.abs(n[0].x - n[1].x)
              , a = Math.abs(n[0].y - n[1].y)
              , v = Math.sqrt(l * l + a * a)
              , m = [.236, .382, .5, .618, .786, 1]
              , C = []
              , S = [];
            return m.forEach(b=>{
                const A = v * b;
                C.push({
                    ...n[0],
                    r: A
                }),
                S.push({
                    x: n[0].x,
                    y: n[0].y + A + 6,
                    text: `${(b * 100).toFixed(1)}%`
                })
            }
            ),
            [{
                type: "circle",
                attrs: C,
                styles: {
                    style: "stroke"
                }
            }, {
                type: "text",
                ignoreEvent: !0,
                attrs: S
            }]
        }
        return []
    }
}
  , ja = {
    name: "fibonacciSegment",
    totalStep: 3,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    createPointFigures: ({coordinates: n, overlay: l, precision: a})=>{
        const v = []
          , m = [];
        if (n.length > 1) {
            const C = n[1].x > n[0].x ? n[0].x : n[1].x
              , S = [1, .786, .618, .5, .382, .236, 0]
              , b = n[0].y - n[1].y
              , A = l.points
              , T = A[0].value - A[1].value;
            S.forEach(I=>{
                const B = n[1].y + b * I
                  , H = (A[1].value + T * I).toFixed(a.price);
                v.push({
                    coordinates: [{
                        x: n[0].x,
                        y: B
                    }, {
                        x: n[1].x,
                        y: B
                    }]
                }),
                m.push({
                    x: C,
                    y: B,
                    text: `${H} (${(I * 100).toFixed(1)}%)`,
                    baseline: "bottom"
                })
            }
            )
        }
        return [{
            type: "line",
            attrs: v
        }, {
            type: "text",
            ignoreEvent: !0,
            attrs: m
        }]
    }
}
  , Wa = {
    name: "fibonacciSpiral",
    totalStep: 3,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    createPointFigures: ({coordinates: n, bounding: l})=>{
        if (n.length > 1) {
            const a = Lr(n[0], n[1]) / Math.sqrt(24)
              , v = n[1].x > n[0].x ? 0 : 1
              , m = oe.utils.getLinearSlopeIntercept(n[0], n[1]);
            let C;
            m ? C = Math.atan(m[0]) + Math.PI * v : n[1].y > n[0].y ? C = Math.PI / 2 : C = Math.PI / 2 * 3;
            const S = gn({
                x: n[0].x - a,
                y: n[0].y
            }, n[0], C)
              , b = gn({
                x: n[0].x - a,
                y: n[0].y - a
            }, n[0], C)
              , A = [{
                ...S,
                r: a,
                startAngle: C,
                endAngle: C + Math.PI / 2
            }, {
                ...b,
                r: a * 2,
                startAngle: C + Math.PI / 2,
                endAngle: C + Math.PI
            }];
            let T = n[0].x - a
              , I = n[0].y - a;
            for (let B = 2; B < 9; B++) {
                const H = A[B - 2].r + A[B - 1].r;
                let Z = 0;
                switch (B % 4) {
                case 0:
                    {
                        Z = C,
                        T -= A[B - 2].r;
                        break
                    }
                case 1:
                    {
                        Z = C + Math.PI / 2,
                        I -= A[B - 2].r;
                        break
                    }
                case 2:
                    {
                        Z = C + Math.PI,
                        T += A[B - 2].r;
                        break
                    }
                case 3:
                    {
                        Z = C + Math.PI / 2 * 3,
                        I += A[B - 2].r;
                        break
                    }
                }
                const ce = Z + Math.PI / 2
                  , ge = gn({
                    x: T,
                    y: I
                }, n[0], C);
                A.push({
                    ...ge,
                    r: H,
                    startAngle: Z,
                    endAngle: ce
                })
            }
            return [{
                type: "arc",
                attrs: A
            }, {
                type: "line",
                attrs: xi(n, l)
            }]
        }
        return []
    }
}
  , Qa = {
    name: "fibonacciSpeedResistanceFan",
    totalStep: 3,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    createPointFigures: ({coordinates: n, bounding: l})=>{
        const a = [];
        let v = [];
        const m = [];
        if (n.length > 1) {
            const C = n[1].x > n[0].x ? -38 : 4
              , S = n[1].y > n[0].y ? -2 : 20
              , b = n[1].x - n[0].x
              , A = n[1].y - n[0].y;
            [1, .75, .618, .5, .382, .25, 0].forEach(T=>{
                const I = n[1].x - b * T
                  , B = n[1].y - A * T;
                a.push({
                    coordinates: [{
                        x: I,
                        y: n[0].y
                    }, {
                        x: I,
                        y: n[1].y
                    }]
                }),
                a.push({
                    coordinates: [{
                        x: n[0].x,
                        y: B
                    }, {
                        x: n[1].x,
                        y: B
                    }]
                }),
                v = v.concat(xi([n[0], {
                    x: I,
                    y: n[1].y
                }], l)),
                v = v.concat(xi([n[0], {
                    x: n[1].x,
                    y: B
                }], l)),
                m.unshift({
                    x: n[0].x + C,
                    y: B + 10,
                    text: `${T.toFixed(3)}`
                }),
                m.unshift({
                    x: I - 18,
                    y: n[0].y + S,
                    text: `${T.toFixed(3)}`
                })
            }
            )
        }
        return [{
            type: "line",
            attrs: a
        }, {
            type: "line",
            attrs: v
        }, {
            type: "text",
            ignoreEvent: !0,
            attrs: m
        }]
    }
}
  , Ka = {
    name: "fibonacciExtension",
    totalStep: 4,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    createPointFigures: ({coordinates: n, overlay: l, precision: a})=>{
        const v = []
          , m = [];
        if (n.length > 2) {
            const C = l.points
              , S = C[1].value - C[0].value
              , b = n[1].y - n[0].y
              , A = [0, .236, .382, .5, .618, .786, 1]
              , T = n[2].x > n[1].x ? n[1].x : n[2].x;
            A.forEach(I=>{
                const B = n[2].y + b * I
                  , H = (C[2].value + S * I).toFixed(a.price);
                v.push({
                    coordinates: [{
                        x: n[1].x,
                        y: B
                    }, {
                        x: n[2].x,
                        y: B
                    }]
                }),
                m.push({
                    x: T,
                    y: B,
                    text: `${H} (${(I * 100).toFixed(1)}%)`,
                    baseline: "bottom"
                })
            }
            )
        }
        return [{
            type: "line",
            attrs: {
                coordinates: n
            },
            styles: {
                style: "dashed"
            }
        }, {
            type: "line",
            attrs: v
        }, {
            type: "text",
            ignoreEvent: !0,
            attrs: m
        }]
    }
}
  , Za = {
    name: "gannBox",
    totalStep: 3,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    styles: {
        polygon: {
            color: "rgba(22, 119, 255, 0.15)"
        }
    },
    createPointFigures: ({coordinates: n})=>{
        if (n.length > 1) {
            const l = (n[1].y - n[0].y) / 4
              , a = n[1].x - n[0].x
              , v = [{
                coordinates: [n[0], {
                    x: n[1].x,
                    y: n[1].y - l
                }]
            }, {
                coordinates: [n[0], {
                    x: n[1].x,
                    y: n[1].y - l * 2
                }]
            }, {
                coordinates: [{
                    x: n[0].x,
                    y: n[1].y
                }, {
                    x: n[1].x,
                    y: n[0].y + l
                }]
            }, {
                coordinates: [{
                    x: n[0].x,
                    y: n[1].y
                }, {
                    x: n[1].x,
                    y: n[0].y + l * 2
                }]
            }, {
                coordinates: [{
                    ...n[0]
                }, {
                    x: n[0].x + a * .236,
                    y: n[1].y
                }]
            }, {
                coordinates: [{
                    ...n[0]
                }, {
                    x: n[0].x + a * .5,
                    y: n[1].y
                }]
            }, {
                coordinates: [{
                    x: n[0].x,
                    y: n[1].y
                }, {
                    x: n[0].x + a * .236,
                    y: n[0].y
                }]
            }, {
                coordinates: [{
                    x: n[0].x,
                    y: n[1].y
                }, {
                    x: n[0].x + a * .5,
                    y: n[0].y
                }]
            }]
              , m = [{
                coordinates: [n[0], n[1]]
            }, {
                coordinates: [{
                    x: n[0].x,
                    y: n[1].y
                }, {
                    x: n[1].x,
                    y: n[0].y
                }]
            }];
            return [{
                type: "line",
                attrs: [{
                    coordinates: [n[0], {
                        x: n[1].x,
                        y: n[0].y
                    }]
                }, {
                    coordinates: [{
                        x: n[1].x,
                        y: n[0].y
                    }, n[1]]
                }, {
                    coordinates: [n[1], {
                        x: n[0].x,
                        y: n[1].y
                    }]
                }, {
                    coordinates: [{
                        x: n[0].x,
                        y: n[1].y
                    }, n[0]]
                }]
            }, {
                type: "polygon",
                ignoreEvent: !0,
                attrs: {
                    coordinates: [n[0], {
                        x: n[1].x,
                        y: n[0].y
                    }, n[1], {
                        x: n[0].x,
                        y: n[1].y
                    }]
                },
                styles: {
                    style: "fill"
                }
            }, {
                type: "line",
                attrs: v,
                styles: {
                    style: "dashed"
                }
            }, {
                type: "line",
                attrs: m
            }]
        }
        return []
    }
}
  , Ha = {
    name: "threeWaves",
    totalStep: 5,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    createPointFigures: ({coordinates: n})=>{
        const l = n.map((a,v)=>({
            ...a,
            text: `(${v})`,
            baseline: "bottom"
        }));
        return [{
            type: "line",
            attrs: {
                coordinates: n
            }
        }, {
            type: "text",
            ignoreEvent: !0,
            attrs: l
        }]
    }
}
  , Ua = {
    name: "fiveWaves",
    totalStep: 7,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    createPointFigures: ({coordinates: n})=>{
        const l = n.map((a,v)=>({
            ...a,
            text: `(${v})`,
            baseline: "bottom"
        }));
        return [{
            type: "line",
            attrs: {
                coordinates: n
            }
        }, {
            type: "text",
            ignoreEvent: !0,
            attrs: l
        }]
    }
}
  , Xa = {
    name: "eightWaves",
    totalStep: 10,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    createPointFigures: ({coordinates: n})=>{
        const l = n.map((a,v)=>({
            ...a,
            text: `(${v})`,
            baseline: "bottom"
        }));
        return [{
            type: "line",
            attrs: {
                coordinates: n
            }
        }, {
            type: "text",
            ignoreEvent: !0,
            attrs: l
        }]
    }
}
  , Ga = {
    name: "anyWaves",
    totalStep: Number.MAX_SAFE_INTEGER,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    createPointFigures: ({coordinates: n})=>{
        const l = n.map((a,v)=>({
            ...a,
            text: `(${v})`,
            baseline: "bottom"
        }));
        return [{
            type: "line",
            attrs: {
                coordinates: n
            }
        }, {
            type: "text",
            ignoreEvent: !0,
            attrs: l
        }]
    }
}
  , $a = {
    name: "abcd",
    totalStep: 5,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    createPointFigures: ({coordinates: n})=>{
        let l = []
          , a = [];
        const v = ["A", "B", "C", "D"]
          , m = n.map((C,S)=>({
            ...C,
            baseline: "bottom",
            text: `(${v[S]})`
        }));
        return n.length > 2 && (l = [n[0], n[2]],
        n.length > 3 && (a = [n[1], n[3]])),
        [{
            type: "line",
            attrs: {
                coordinates: n
            }
        }, {
            type: "line",
            attrs: [{
                coordinates: l
            }, {
                coordinates: a
            }],
            styles: {
                style: "dashed"
            }
        }, {
            type: "text",
            ignoreEvent: !0,
            attrs: m
        }]
    }
}
  , Ja = {
    name: "xabcd",
    totalStep: 6,
    needDefaultPointFigure: !0,
    needDefaultXAxisFigure: !0,
    needDefaultYAxisFigure: !0,
    styles: {
        polygon: {
            color: "rgba(22, 119, 255, 0.15)"
        }
    },
    createPointFigures: ({coordinates: n, overlay: l})=>{
        const a = []
          , v = []
          , m = ["X", "A", "B", "C", "D"]
          , C = n.map((S,b)=>({
            ...S,
            baseline: "bottom",
            text: `(${m[b]})`
        }));
        return n.length > 2 && (a.push({
            coordinates: [n[0], n[2]]
        }),
        v.push({
            coordinates: [n[0], n[1], n[2]]
        }),
        n.length > 3 && (a.push({
            coordinates: [n[1], n[3]]
        }),
        n.length > 4 && (a.push({
            coordinates: [n[2], n[4]]
        }),
        v.push({
            coordinates: [n[2], n[3], n[4]]
        })))),
        [{
            type: "line",
            attrs: {
                coordinates: n
            }
        }, {
            type: "line",
            attrs: a,
            styles: {
                style: "dashed"
            }
        }, {
            type: "polygon",
            ignoreEvent: !0,
            attrs: v
        }, {
            type: "text",
            ignoreEvent: !0,
            attrs: C
        }]
    }
}
  , qa = [Na, Ra, Oa, Ya, za, Va, ja, Wa, Qa, Ka, Za, Ha, Ua, Xa, Ga, $a, Ja];